Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

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

Merged
merged 1 commit into from
Feb 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/timeline/component/ItemSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down