diff --git a/template/assets/markline/0.5.3/markline-debug.js b/template/assets/markline/0.5.3/markline-debug.js
index 34fb44e..ed597bc 100644
--- a/template/assets/markline/0.5.3/markline-debug.js
+++ b/template/assets/markline/0.5.3/markline-debug.js
@@ -319,6 +319,34 @@ define("markline/0.5.3/timeline-debug", ["jquery/2.1.1/jquery-debug"], function(
this._element.append([''].join(""));
this._element.append(head_dates.join(""));
this._element.append(body_events.join(""));
+ // scroll via mouse drag and drop.
+ var startingMousePostition;
+ var startingPagePosition;
+ this._element.on('mousedown', function(event) {
+ startingMousePostition = {
+ x: event.clientX,
+ y: event.clientY
+ };
+ startingPagePosition = {
+ x: me._element.scrollLeft(),
+ y: me._element.scrollTop()
+ };
+ console.log(startingPagePosition)
+ console.log(startingMousePostition)
+ me._element.on('mousemove', drag);
+ });
+ this._element.on('mouseup', function(event) {
+ me._element.off('mousemove', drag);
+ });
+
+ function drag(event) {
+ event.preventDefault();
+ var x = startingPagePosition.x + (startingMousePostition.x - event.clientX);
+ var y = startingPagePosition.y + (startingMousePostition.y - event.clientY);
+ console.log("D", x, y)
+ me._element.scrollLeft(x);
+ me._element.scrollTop(y);
+ }
};
module.exports = Markline;
});
\ No newline at end of file
diff --git a/template/assets/markline/0.5.3/markline.js b/template/assets/markline/0.5.3/markline.js
index 7d5b77a..28762c8 100644
--- a/template/assets/markline/0.5.3/markline.js
+++ b/template/assets/markline/0.5.3/markline.js
@@ -1 +1 @@
-define("markline/0.5.3/markline",["jquery/2.1.1/jquery"],function(t,e,a){function r(t){return"[object String]"===Object.prototype.toString.call(t)}function n(t,e){this.element=t;var a=o(e);this.timeline=new c(this.element,a)}function s(t){if(!t)return new Date;var e=/^(\d{4})(?:[/-](\d{1,2})(?:[/-](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2}))?)?)?)?)?$/,a=t.match(e);if(a){var r=a[1],n=parseInt(a[2]||1,10)-1,s=a[3]||1,i=a[4]||0,l=a[5]||0,o=a[6]||0;return new Date(r,n,s,i,l,o)}}function i(t){var e=/^\d{4}$/,a=/^\d{4}[\/\-]\d{1,2}$/,r=s(t);return e.test(t)?r.setYear(r.getFullYear()+1):a.test(t)&&(11===r.getMonth()?(r.setYear(r.getFullYear()+1),r.setMonth(0)):r.setMonth(r.getMonth()+1)),r}function l(t,e){var a=/!\[([^\]]*)\]\(([^\)]+)\)/g,r=/\[([^\]]*)\]\(([^\)]+)\)/g,n=/(\*\*|__)(.*?)\1/g,s=/(\*|_)(.*?)\1/g,i=/(\~\~?)(.*?)\1/g,l=/(^|[^a-zA-Z0-9])@([^\s\t,\(\)\[\]\{\}]+)/g,o=/\{@mention\}/gi,c=/(?:^|[\s\t])\#([^\s\t]+)/g,p=t.replace(a,'$1');return p=p.replace(r,'$1'),p=p.replace(n,"$2"),p=p.replace(s,"$2"),p=p.replace(i,"$2"),e.mention&&(p=p.replace(l,function(t,a,r){var n=e.mention||d;return a+'@'+r+""})),p=p.replace(c,function(t,a){var r,n=e.tags||e.tag||{};if(n.hasOwnProperty(a)){var s=(n[a]||"").split(/,[\s\t]+/),i=s[0],l=s[1];r=' style="color:'+i+";background-color:"+l+';"'}return'#"+a+""})}function o(t){function e(t){for(;d.body.hasOwnProperty(t);)t+=" ";y=l(t,d.meta),d.body[y]=[],b=!0}for(var a,n,o,c=t.split(/\r\n|\r|\n/),d={title:"",meta:{},body:{}},p=/^#\s+(.*)$/,u=/^[\-\*]\s+([^:]+):\s*(.*)$/,h=/^[\s\t]+[\-\*]\s+([^:]+):\s*(.*)$/,f=/^\-{2,}$/,m=/^##+\s+(.*)$/,v=/^[\*\-]\s+(([0-9\/\-]+)(?:~([0-9\/\-]*))?)\s+(.*)$/,g=/^\s+[\*\-]\s+(([0-9\/\-]+)(?:~([0-9\/\-]*))?)\s+(.*)$/,y="",b=!1,$=!1,j=0,_=c.length;_>j;j++){var w,k=c[j];if(w=k.match(p))d.title=l(w[1],d.meta);else if(!b&&(w=k.match(u))){var q=w[1],x=w[2];d.meta[q]=x,n=q,o=x,$=!0}else if(!b&&(w=k.match(h))){r(d.meta[n])&&(d.meta[n]={"default":o});var q=w[1],x=w[2];d.meta[n][q]=x,$=!0}else if(k.match(f))e("");else if(w=k.match(m)){var Y=w[1];e(Y)}else if(w=k.match(v)){d.body[y]||(d.body[y]=[]);var F=w[2],O=void 0===w[3]?F:w[3],M=w[4],D={date:w[1],"date-start":s(F),"date-end":i(O),name:l(M,d.meta),events:[]};d.body[y].push(D),a=D,b=!0}else if(w=k.match(g)){var P=w[1],S=w[2],T=void 0===w[3]?S:w[3],I=w[4];a.events.push({date:P,"date-start":s(S),"date-end":i(T),name:l(I,d.meta)}),b=!0}}return d}var c=t("markline/0.5.3/timeline"),d=(t("jquery/2.1.1/jquery"),"https://github.com/{@mention}");n.prototype.render=function(){this.timeline.render()},a.exports=n}),define("markline/0.5.3/timeline",["jquery/2.1.1/jquery"],function(t,e,a){function r(t,e){this._element=i(t),this.title=e.title||"",this.meta=e.meta||{},this.body=e.body||{}}function n(t){return parseInt(t/864e5*o/365.24,10)}function s(t){return"[object Function]"===Object.prototype.toString.call(t)}var i=t("jquery/2.1.1/jquery"),l=30,o=100;r.prototype._process=function(t,e){if(e)for(var a in t)if(t.hasOwnProperty(a)){var r=t[a];s(e["group:start"])&&e["group:start"].call(this,a,r);for(var n=0,i=r.length;i>n;n++){var l=r[n];if(s(e["line:start"])&&e["line:start"].call(this,l),l.events)for(var o=0,c=l.events.length;c>o;o++)s(e.event)&&e.event.call(this,l.events[o]);s(e["line:stop"])&&e["line:stop"].call(this,l)}s(e["group:stop"])&&e["group:stop"].call(this,a,r)}},r.prototype.render=function(){var t,e;this._process(this.body,{"line:start":function(a){var r=a["date-start"],n=a["date-end"];(!t||t>r)&&(t=r),(!e||n>e)&&(e=n)}});var a=t.getFullYear(),r=e.getFullYear()+2;t=new Date(a,0,1);for(var s=['
',"
"],o=a,c=0;r>=o;o++,c++)s.push("");s.push("
","
");var d=[''],p=0;this._process(this.body,{"group:start":function(t){d.push('
',"
","
")},"group:stop":function(){d.push("
","
")},"line:start":function(e){var a=e["date-start"],r=e["date-end"],s=n(a-t)+l;p=a;var i=n(r-a);8>i&&(i=8),d.push('
',"",'
')},"line:stop":function(t){d.push("
","
","
","
","")},event:function(t){var e=n(t["date-start"]-p),a=n(t["date-end"]-t["date-start"]);8>a&&(a=8,e-=4),d.push('
')}});this._element.addClass("markline"),this._element.on("scroll",function(){var t=i(this),e=i("> header",this);e.css({left:t.scrollLeft(),bottom:-t.scrollTop()});var a=i(".dates",this);a.css({top:t.scrollTop()});var r=i(".groups > label",this);r.css({left:t.scrollLeft()-90})}),this._element.append(["
"].join("")),this._element.append(s.join("")),this._element.append(d.join(""))},a.exports=r});
\ No newline at end of file
+define("markline/0.5.3/markline",["jquery/2.1.1/jquery"],function(e,t,n){function a(e){return"[object String]"===Object.prototype.toString.call(e)}function r(e,t){this.element=e;var n=i(t);this.timeline=new c(this.element,n)}function s(e){if(!e)return new Date;var t=/^(\d{4})(?:[/-](\d{1,2})(?:[/-](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2}))?)?)?)?)?$/,n=e.match(t);if(n){var a=n[1],r=parseInt(n[2]||1,10)-1,s=n[3]||1,l=n[4]||0,o=n[5]||0,i=n[6]||0;return new Date(a,r,s,l,o,i)}}function l(e){var t=/^\d{4}$/,n=/^\d{4}[\/\-]\d{1,2}$/,a=s(e);return t.test(e)?a.setYear(a.getFullYear()+1):n.test(e)&&(11===a.getMonth()?(a.setYear(a.getFullYear()+1),a.setMonth(0)):a.setMonth(a.getMonth()+1)),a}function o(e,t){var n=/!\[([^\]]*)\]\(([^\)]+)\)/g,a=/\[([^\]]*)\]\(([^\)]+)\)/g,r=/(\*\*|__)(.*?)\1/g,s=/(\*|_)(.*?)\1/g,l=/(\~\~?)(.*?)\1/g,o=/(^|[^a-zA-Z0-9])@([^\s\t,\(\)\[\]\{\}]+)/g,i=/\{@mention\}/gi,c=/(?:^|[\s\t])\#([^\s\t]+)/g,p=e.replace(n,'
$1');return p=p.replace(a,'
$1'),p=p.replace(r,"
$2"),p=p.replace(s,"
$2"),p=p.replace(l,"
$2"),t.mention&&(p=p.replace(o,function(e,n,a){var r=t.mention||u;return n+'
@'+a+""})),p=p.replace(c,function(e,n){var a,r=t.tags||t.tag||{};if(r.hasOwnProperty(n)){var s=(r[n]||"").split(/,[\s\t]+/),l=s[0],o=s[1];a=' style="color:'+l+";background-color:"+o+';"'}return'
#"+n+""})}function i(e){function t(e){for(;u.body.hasOwnProperty(e);)e+=" ";y=o(e,u.meta),u.body[y]=[],b=!0}for(var n,r,i,c=e.split(/\r\n|\r|\n/),u={title:"",meta:{},body:{}},p=/^#\s+(.*)$/,d=/^[\-\*]\s+([^:]+):\s*(.*)$/,h=/^[\s\t]+[\-\*]\s+([^:]+):\s*(.*)$/,m=/^\-{2,}$/,f=/^##+\s+(.*)$/,v=/^[\*\-]\s+(([0-9\/\-]+)(?:~([0-9\/\-]*))?)\s+(.*)$/,g=/^\s+[\*\-]\s+(([0-9\/\-]+)(?:~([0-9\/\-]*))?)\s+(.*)$/,y="",b=!1,_=!1,$=0,j=c.length;j>$;$++){var w,x=c[$];if(w=x.match(p))u.title=o(w[1],u.meta);else if(!b&&(w=x.match(d))){var k=w[1],q=w[2];u.meta[k]=q,r=k,i=q,_=!0}else if(!b&&(w=x.match(h))){a(u.meta[r])&&(u.meta[r]={"default":i});var k=w[1],q=w[2];u.meta[r][k]=q,_=!0}else if(x.match(m))t("");else if(w=x.match(f)){var Y=w[1];t(Y)}else if(w=x.match(v)){u.body[y]||(u.body[y]=[]);var D=w[2],F=void 0===w[3]?D:w[3],O=w[4],T={date:w[1],"date-start":s(D),"date-end":l(F),name:o(O,u.meta),events:[]};u.body[y].push(T),n=T,b=!0}else if(w=x.match(g)){var L=w[1],M=w[2],P=void 0===w[3]?M:w[3],S=w[4];n.events.push({date:L,"date-start":s(M),"date-end":l(P),name:o(S,u.meta)}),b=!0}}return u}var c=e("markline/0.5.3/timeline"),u=(e("jquery/2.1.1/jquery"),"https://github.com/{@mention}");r.prototype.render=function(){this.timeline.render()},n.exports=r}),define("markline/0.5.3/timeline",["jquery/2.1.1/jquery"],function(e,t,n){function a(e,t){this._element=l(e),this.title=t.title||"",this.meta=t.meta||{},this.body=t.body||{}}function r(e){return parseInt(e/864e5*i/365.24,10)}function s(e){return"[object Function]"===Object.prototype.toString.call(e)}var l=e("jquery/2.1.1/jquery"),o=30,i=100;a.prototype._process=function(e,t){if(t)for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];s(t["group:start"])&&t["group:start"].call(this,n,a);for(var r=0,l=a.length;l>r;r++){var o=a[r];if(s(t["line:start"])&&t["line:start"].call(this,o),o.events)for(var i=0,c=o.events.length;c>i;i++)s(t.event)&&t.event.call(this,o.events[i]);s(t["line:stop"])&&t["line:stop"].call(this,o)}s(t["group:stop"])&&t["group:stop"].call(this,n,a)}},a.prototype.render=function(){function e(e){e.preventDefault();var t=f.x+(m.x-e.clientX),n=f.y+(m.y-e.clientY);console.log("D",t,n),h._element.scrollLeft(t),h._element.scrollTop(n)}var t,n;this._process(this.body,{"line:start":function(e){var a=e["date-start"],r=e["date-end"];(!t||t>a)&&(t=a),(!n||r>n)&&(n=r)}});var a=t.getFullYear(),s=n.getFullYear()+2;t=new Date(a,0,1);for(var i=['
',"
"],c=a,u=0;s>=c;c++,u++)i.push("");i.push("
","
");var p=['
'],d=0;this._process(this.body,{"group:start":function(e){p.push('
',"
","
")},"group:stop":function(){p.push("
","
")},"line:start":function(e){var n=e["date-start"],a=e["date-end"],s=r(n-t)+o;d=n;var l=r(a-n);8>l&&(l=8),p.push('
',"",'
')},"line:stop":function(e){p.push("
","
","
","
","")},event:function(e){var t=r(e["date-start"]-d),n=r(e["date-end"]-e["date-start"]);8>n&&(n=8,t-=4),p.push('
')}});var h=this;this._element.addClass("markline"),this._element.on("scroll",function(){var e=l(this),t=l("> header",this);t.css({left:e.scrollLeft(),bottom:-e.scrollTop()});var n=l(".dates",this);n.css({top:e.scrollTop()});var a=l(".groups > label",this);a.css({left:e.scrollLeft()-90})}),this._element.append(["
"].join("")),this._element.append(i.join("")),this._element.append(p.join(""));var m,f;this._element.on("mousedown",function(t){m={x:t.clientX,y:t.clientY},f={x:h._element.scrollLeft(),y:h._element.scrollTop()},console.log(f),console.log(m),h._element.on("mousemove",e)}),this._element.on("mouseup",function(){h._element.off("mousemove",e)})},n.exports=a});
\ No newline at end of file
diff --git a/template/assets/markline/0.5.3/timeline-debug.js b/template/assets/markline/0.5.3/timeline-debug.js
index cd6647e..a201f30 100644
--- a/template/assets/markline/0.5.3/timeline-debug.js
+++ b/template/assets/markline/0.5.3/timeline-debug.js
@@ -131,6 +131,34 @@ define("markline/0.5.3/timeline-debug", ["jquery/2.1.1/jquery-debug"], function(
this._element.append(['
'].join(""));
this._element.append(head_dates.join(""));
this._element.append(body_events.join(""));
+ // scroll via mouse drag and drop.
+ var startingMousePostition;
+ var startingPagePosition;
+ this._element.on('mousedown', function(event) {
+ startingMousePostition = {
+ x: event.clientX,
+ y: event.clientY
+ };
+ startingPagePosition = {
+ x: me._element.scrollLeft(),
+ y: me._element.scrollTop()
+ };
+ console.log(startingPagePosition)
+ console.log(startingMousePostition)
+ me._element.on('mousemove', drag);
+ });
+ this._element.on('mouseup', function(event) {
+ me._element.off('mousemove', drag);
+ });
+
+ function drag(event) {
+ event.preventDefault();
+ var x = startingPagePosition.x + (startingMousePostition.x - event.clientX);
+ var y = startingPagePosition.y + (startingMousePostition.y - event.clientY);
+ console.log("D", x, y)
+ me._element.scrollLeft(x);
+ me._element.scrollTop(y);
+ }
};
module.exports = Markline;
});
\ No newline at end of file
diff --git a/template/assets/markline/0.5.3/timeline.js b/template/assets/markline/0.5.3/timeline.js
index 5754e1a..29d1909 100644
--- a/template/assets/markline/0.5.3/timeline.js
+++ b/template/assets/markline/0.5.3/timeline.js
@@ -1 +1 @@
-define("markline/0.5.3/timeline",["jquery/2.1.1/jquery"],function(t,e,s){function l(t,e){this._element=n(t),this.title=e.title||"",this.meta=e.meta||{},this.body=e.body||{}}function i(t){return parseInt(t/864e5*o/365.24,10)}function a(t){return"[object Function]"===Object.prototype.toString.call(t)}var n=t("jquery/2.1.1/jquery"),r=30,o=100;l.prototype._process=function(t,e){if(e)for(var s in t)if(t.hasOwnProperty(s)){var l=t[s];a(e["group:start"])&&e["group:start"].call(this,s,l);for(var i=0,n=l.length;n>i;i++){var r=l[i];if(a(e["line:start"])&&e["line:start"].call(this,r),r.events)for(var o=0,p=r.events.length;p>o;o++)a(e.event)&&e.event.call(this,r.events[o]);a(e["line:stop"])&&e["line:stop"].call(this,r)}a(e["group:stop"])&&e["group:stop"].call(this,s,l)}},l.prototype.render=function(){var t,e;this._process(this.body,{"line:start":function(s){var l=s["date-start"],i=s["date-end"];(!t||t>l)&&(t=l),(!e||i>e)&&(e=i)}});var s=t.getFullYear(),l=e.getFullYear()+2;t=new Date(s,0,1);for(var a=['
',"
"],o=s,p=0;l>=o;o++,p++)a.push("");a.push("
","
");var h=['
'],d=0;this._process(this.body,{"group:start":function(t){h.push('
',"
","
")},"group:stop":function(){h.push("
","
")},"line:start":function(e){var s=e["date-start"],l=e["date-end"],a=i(s-t)+r;d=s;var n=i(l-s);8>n&&(n=8),h.push('
',"",'
')},"line:stop":function(t){h.push("
","
","
","
","")},event:function(t){var e=i(t["date-start"]-d),s=i(t["date-end"]-t["date-start"]);8>s&&(s=8,e-=4),h.push('
')}});this._element.addClass("markline"),this._element.on("scroll",function(){var t=n(this),e=n("> header",this);e.css({left:t.scrollLeft(),bottom:-t.scrollTop()});var s=n(".dates",this);s.css({top:t.scrollTop()});var l=n(".groups > label",this);l.css({left:t.scrollLeft()-90})}),this._element.append(["
"].join("")),this._element.append(a.join("")),this._element.append(h.join(""))},s.exports=l});
\ No newline at end of file
+define("markline/0.5.3/timeline",["jquery/2.1.1/jquery"],function(e,t,l){function s(e,t){this._element=i(e),this.title=t.title||"",this.meta=t.meta||{},this.body=t.body||{}}function n(e){return parseInt(e/864e5*a/365.24,10)}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var i=e("jquery/2.1.1/jquery"),r=30,a=100;s.prototype._process=function(e,t){if(t)for(var l in e)if(e.hasOwnProperty(l)){var s=e[l];o(t["group:start"])&&t["group:start"].call(this,l,s);for(var n=0,i=s.length;i>n;n++){var r=s[n];if(o(t["line:start"])&&t["line:start"].call(this,r),r.events)for(var a=0,c=r.events.length;c>a;a++)o(t.event)&&t.event.call(this,r.events[a]);o(t["line:stop"])&&t["line:stop"].call(this,r)}o(t["group:stop"])&&t["group:stop"].call(this,l,s)}},s.prototype.render=function(){function e(e){e.preventDefault();var t=f.x+(v.x-e.clientX),l=f.y+(v.y-e.clientY);console.log("D",t,l),d._element.scrollLeft(t),d._element.scrollTop(l)}var t,l;this._process(this.body,{"line:start":function(e){var s=e["date-start"],n=e["date-end"];(!t||t>s)&&(t=s),(!l||n>l)&&(l=n)}});var s=t.getFullYear(),o=l.getFullYear()+2;t=new Date(s,0,1);for(var a=['
',"
"],c=s,p=0;o>=c;c++,p++)a.push("");a.push("
","
");var u=['
'],h=0;this._process(this.body,{"group:start":function(e){u.push('
',"
","
")},"group:stop":function(){u.push("
","
")},"line:start":function(e){var l=e["date-start"],s=e["date-end"],o=n(l-t)+r;h=l;var i=n(s-l);8>i&&(i=8),u.push('
',"",'
')},"line:stop":function(e){u.push("
","
","
","
","")},event:function(e){var t=n(e["date-start"]-h),l=n(e["date-end"]-e["date-start"]);8>l&&(l=8,t-=4),u.push('
')}});var d=this;this._element.addClass("markline"),this._element.on("scroll",function(){var e=i(this),t=i("> header",this);t.css({left:e.scrollLeft(),bottom:-e.scrollTop()});var l=i(".dates",this);l.css({top:e.scrollTop()});var s=i(".groups > label",this);s.css({left:e.scrollLeft()-90})}),this._element.append(["
"].join("")),this._element.append(a.join("")),this._element.append(u.join(""));var v,f;this._element.on("mousedown",function(t){v={x:t.clientX,y:t.clientY},f={x:d._element.scrollLeft(),y:d._element.scrollTop()},console.log(f),console.log(v),d._element.on("mousemove",e)}),this._element.on("mouseup",function(){d._element.off("mousemove",e)})},l.exports=s});
\ No newline at end of file
diff --git a/timeline.js b/timeline.js
index 0776232..fd420f2 100644
--- a/timeline.js
+++ b/timeline.js
@@ -186,6 +186,38 @@ Markline.prototype.render = function(){
this._element.append(head_dates.join(""));
this._element.append(body_events.join(""));
+
+ // scroll via mouse drag and drop.
+ var startingMousePostition;
+ var startingPagePosition;
+ this._element.on('mousedown', function(event){
+ startingMousePostition = {
+ x: event.clientX,
+ y: event.clientY
+ };
+ startingPagePosition = {
+ x: me._element.scrollLeft(),
+ y: me._element.scrollTop()
+ };
+
+ console.log(startingPagePosition)
+ console.log(startingMousePostition)
+ me._element.on('mousemove', drag);
+ });
+ this._element.on('mouseup', function(event){
+ me._element.off('mousemove', drag);
+ });
+
+ function drag(event){
+ event.preventDefault();
+ var x = startingPagePosition.x + (startingMousePostition.x - event.clientX);
+ var y = startingPagePosition.y + (startingMousePostition.y - event.clientY);
+ console.log("D", x, y)
+ me._element.scrollLeft(x);
+ me._element.scrollTop(y);
+ }
};
+
+
module.exports = Markline;