Browse Source

Merged from develop branch

css_transitions
jos 10 years ago
parent
commit
4c77206e72
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      src/timeline/Timeline.js

+ 7
- 6
src/timeline/Timeline.js View File

@ -112,7 +112,7 @@ function Timeline (container, items, options) {
// item set // item set
this.itemSet = new ItemSet(this, this.options); this.itemSet = new ItemSet(this, this.options);
this.components.push(this.itemSet); this.components.push(this.itemSet);
this.emitter.on('change', this.repaint.bind(this));
this.emitter.on('change', this.redraw.bind(this));
/* TODO /* TODO
// root panel // root panel
@ -378,7 +378,7 @@ Timeline.prototype._create = function () {
// create a central event bus // create a central event bus
this.emitter = this; this.emitter = this;
this.emitter.on('rangechange', this.repaint.bind(this));
this.emitter.on('rangechange', this.redraw.bind(this));
// create event listeners for all interesting events, these events will be // create event listeners for all interesting events, these events will be
// emitted via emitter // emitted via emitter
@ -498,8 +498,8 @@ Timeline.prototype.setOptions = function (options) {
throw new Error('Option order is deprecated. There is no replacement for this feature.'); throw new Error('Option order is deprecated. There is no replacement for this feature.');
} }
// repaint everything
this.repaint();
// redraw everything
this.redraw();
}; };
/** /**
@ -843,11 +843,12 @@ Timeline.prototype.redraw = function() {
}); });
if (resized) { if (resized) {
// keep repainting until all sizes are settled // keep repainting until all sizes are settled
this.repaint();
this.redraw();
} }
};
// TODO: deprecated since version 1.1.0, remove some day // TODO: deprecated since version 1.1.0, remove some day
Timeline.prototype.repaint = function repaint() {
Timeline.prototype.repaint = function () {
throw new Error('Function repaint is deprecated. Use redraw instead.'); throw new Error('Function repaint is deprecated. Use redraw instead.');
}; };

Loading…
Cancel
Save