From 2860d7313e7be9a63a525188a5102050257ca2a6 Mon Sep 17 00:00:00 2001 From: Ian Oberst Date: Mon, 2 Oct 2017 11:48:43 -0700 Subject: [PATCH] Item Redraw Performance - Bug Fix (#3513) * Fixing a bug with the call to `repositionX`. The `items` collection is an object, not an array, so it cannot be iterated over using a normal for loop. Not repositioning the items causes the vertical stacking to jump around sporatically while scrolling. * Update Group.js --- lib/timeline/component/Group.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/timeline/component/Group.js b/lib/timeline/component/Group.js index cbbcbee6..a0542904 100644 --- a/lib/timeline/component/Group.js +++ b/lib/timeline/component/Group.js @@ -300,9 +300,9 @@ Group.prototype._redrawItems = function(forceRestack, lastIsVisible, margin, ran } } - for (i = 0; i < this.items.length; i++) { - this.items[i].repositionX(limitSize); - } + util.forEach(this.items, function (item) { + item.repositionX(limitSize); + }); if (this.doInnerStack && this.itemSet.options.stackSubgroups) { // Order the items within each subgroup