From dcb2d586162b66f980a62f1a005212a9fef9204d Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Fri, 2 Dec 2016 22:23:05 +0200 Subject: [PATCH 1/5] Fix redraw order --- lib/timeline/Core.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 1eeb0faaa..aa8344da6 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -115,6 +115,10 @@ Core.prototype._create = function (container) { this.on('panmove', this._onDrag.bind(this)); var me = this; + + this._origRedraw = this._redraw.bind(this); + this._redraw = util.throttle(this._origRedraw); + this.on('_change', function (properties) { if (me.itemSet.initialItemSetDrawn && properties && properties.queue == true) { me._redraw() @@ -412,15 +416,7 @@ Core.prototype.setOptions = function (options) { this.configurator.setModuleOptions({global: appliedOptions}); } - // override redraw with a throttled version - if (!this._origRedraw) { - this._origRedraw = this._redraw.bind(this); - this._redraw = util.throttle(this._origRedraw); - } else { - // Not the initial run: redraw everything - this._redraw(); - } - + this._redraw(); }; /** From 2f04345f805f873f1ebfe185e772da0afb94c3f4 Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Tue, 20 Dec 2016 23:13:21 +0200 Subject: [PATCH 2/5] Fix error when option is not defined --- lib/timeline/Timeline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index 8abe01820..0d4b62e37 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -70,7 +70,8 @@ function Timeline (container, items, groups, options) { } else { this.options.rtl = options.rtl; } - this.options.rollingMode = options.rollingMode; + + this.options.rollingMode = options && options.rollingMode; // all components listed here will be repainted automatically this.components = []; From 3cfa8d09fdc78f28fdae7dc02ce6d80e56a6a366 Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Thu, 22 Dec 2016 20:43:25 +0200 Subject: [PATCH 3/5] Allow template labels --- lib/timeline/component/TimeAxis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/timeline/component/TimeAxis.js b/lib/timeline/component/TimeAxis.js index d80435219..30f1903be 100644 --- a/lib/timeline/component/TimeAxis.js +++ b/lib/timeline/component/TimeAxis.js @@ -332,8 +332,7 @@ TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className this.dom.foreground.appendChild(label); } this.dom.minorTexts.push(label); - - label.childNodes[0].nodeValue = text; + label.innerHTML = text; label.style.top = (orientation == 'top') ? (this.props.majorLabelHeight + 'px') : '0'; @@ -364,7 +363,8 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className if (!label) { // create label - var content = document.createTextNode(text); + var content = document.createElement('div'); + content.innerHTML = text; label = document.createElement('div'); label.appendChild(content); this.dom.foreground.appendChild(label); From 49826794b612fa13f63b189515ababf31cb61aae Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Thu, 5 Jan 2017 17:45:07 +0200 Subject: [PATCH 4/5] Add .travis.yml file --- .travis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e69de29bb From b9144d31d443e3cada728e6f64967371874efc0a Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Thu, 5 Jan 2017 18:02:24 +0200 Subject: [PATCH 5/5] Add experiment travis code --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index e69de29bb..cb3369284 100644 --- a/.travis.yml +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: "6" +before_script: + - npm install -g gulp +script: gulp \ No newline at end of file