From 0e0b6f57420fda47fd8984f0ea035633e3d95feb Mon Sep 17 00:00:00 2001 From: yotamberk Date: Sun, 30 Oct 2016 09:59:40 +0200 Subject: [PATCH] Fixes background items with no groups (#2241) --- lib/timeline/component/Group.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/timeline/component/Group.js b/lib/timeline/component/Group.js index 691d24b1..042b477a 100644 --- a/lib/timeline/component/Group.js +++ b/lib/timeline/component/Group.js @@ -502,8 +502,7 @@ Group.prototype.order = function() { Group.prototype._updateVisibleItems = function(orderedItems, oldVisibleItems, range) { var visibleItems = []; var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems - - if (!this.isVisible) { + if (!this.isVisible && this.groupId != "__background__") { for (var i = 0; i < oldVisibleItems.length; i++) { var item = oldVisibleItems[i]; if (item.displayed) item.hide(); @@ -557,7 +556,6 @@ Group.prototype._updateVisibleItems = function(orderedItems, oldVisibleItems, ra }); } - // finally, we reposition all the visible items. for (var i = 0; i < visibleItems.length; i++) { var item = visibleItems[i];