From 644f8eee1aa4234382b5bdaa4f55c1361119a68b Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 27 Aug 2015 14:15:18 +0200 Subject: [PATCH] Fixed #1214: items wrongly marked as dirty with every `rangechange` event --- lib/timeline/Core.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 3c5abc61..c0c261bc 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -91,7 +91,7 @@ Core.prototype._create = function (container) { this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); this.on('rangechange', function () { - this.redraw(); // this allows overriding the redraw method + this._redraw(); // this allows overriding the _redraw method }.bind(this)); this.on('touch', this._onTouch.bind(this)); this.on('pan', this._onDrag.bind(this)); @@ -316,9 +316,9 @@ Core.prototype.setOptions = function (options) { // override redraw with a throttled version if (!this._origRedraw) { - this._origRedraw = this.redraw.bind(this); + this._origRedraw = this._redraw.bind(this); } - this.redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); + this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); // redraw everything this._redraw(); @@ -448,7 +448,7 @@ Core.prototype.addCustomTime = function (time, id) { this.customTimes.push(customTime); this.components.push(customTime); - this.redraw(); + this._redraw(); return id; };