Browse Source

Fixed #1214: items wrongly marked as dirty with every `rangechange` event

webworkersNetwork
jos 9 years ago
parent
commit
644f8eee1a
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      lib/timeline/Core.js

+ 4
- 4
lib/timeline/Core.js View File

@ -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;
};

Loading…
Cancel
Save