Browse Source

[Timeline] Modify redraw logic to treat scroll as needing restack. (#2774)

This addresses #1982 and #1417.

It possibly reduces performance, but correctness seems better.
revert-2743-editable-option-2017-02-16
Brad Hards 7 years ago
committed by yotamberk
parent
commit
6b5462ec43
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/timeline/component/ItemSet.js

+ 3
- 1
lib/timeline/component/ItemSet.js View File

@ -616,8 +616,10 @@ ItemSet.prototype.redraw = function() {
// TODO: would be nicer to get this as a trigger from Range
var visibleInterval = range.end - range.start;
var zoomed = (visibleInterval != this.lastVisibleInterval) || (this.props.width != this.props.lastWidth);
if (zoomed) this.stackDirty = true;
var scrolled = range.start != this.lastRangeStart;
if (zoomed || scrolled) this.stackDirty = true;
this.lastVisibleInterval = visibleInterval;
this.lastRangeStart = range.start;
this.props.lastWidth = this.props.width;
var restack = this.stackDirty;

Loading…
Cancel
Save