Browse Source

Fix Group Performance (#3453)

* Implement group redraw @grimalschi performance enhancement

* Fix JSDoc for redraw

* Remove commented out in itemset

* Remove fasdom

* Clean up queue functions in group redraw

* Fix mistake in comments

* Remove extra read-write from _didResize

* Resolve review comments

* Fix ranged item resizing bug

* remove parameter that wasn;t used
jittering-top
Yotam Berkowitz 7 years ago
committed by GitHub
parent
commit
f570fed5c1
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      lib/timeline/component/Group.js

+ 10
- 9
lib/timeline/component/Group.js View File

@ -285,7 +285,7 @@ Group.prototype._applyGroupHeight = function(height) {
}
// update vertical position of items after they are re-stacked and the height of the group is calculated
Group.prototype._updateItemsVerticalPosition = function(resized, margin) {
Group.prototype._updateItemsVerticalPosition = function(margin) {
for (var i = 0, ii = this.visibleItems.length; i < ii; i++) {
var item = this.visibleItems[i];
item.repositionY(margin);
@ -293,12 +293,6 @@ Group.prototype._updateItemsVerticalPosition = function(resized, margin) {
if (item.displayed) item.hide();
}
}
if (!this.isVisible && this.height) {
return false;
}
return resized;
}
/**
@ -360,8 +354,15 @@ Group.prototype.redraw = function(range, margin, forceRestack, returnQueue) {
// update vertical position of items after they are re-stacked and the height of the group is calculated
(function() {
return resized = this._updateItemsVerticalPosition.bind(this)(resized, margin)
}).bind(this)
this._updateItemsVerticalPosition.bind(this)(margin)
}).bind(this),
function() {
if (!this.isVisible && this.height) {
resized = false;
}
return resized
}
]
if (returnQueue) {

Loading…
Cancel
Save