Browse Source

Fixes background items with no groups (#2241)

codeClimate
yotamberk 8 years ago
committed by Alexander Wunschik
parent
commit
0e0b6f5742
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      lib/timeline/component/Group.js

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

@ -502,8 +502,7 @@ Group.prototype.order = function() {
Group.prototype._updateVisibleItems = function(orderedItems, oldVisibleItems, range) { Group.prototype._updateVisibleItems = function(orderedItems, oldVisibleItems, range) {
var visibleItems = []; var visibleItems = [];
var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on 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++) { for (var i = 0; i < oldVisibleItems.length; i++) {
var item = oldVisibleItems[i]; var item = oldVisibleItems[i];
if (item.displayed) item.hide(); if (item.displayed) item.hide();
@ -557,7 +556,6 @@ Group.prototype._updateVisibleItems = function(orderedItems, oldVisibleItems, ra
}); });
} }
// finally, we reposition all the visible items. // finally, we reposition all the visible items.
for (var i = 0; i < visibleItems.length; i++) { for (var i = 0; i < visibleItems.length; i++) {
var item = visibleItems[i]; var item = visibleItems[i];

Loading…
Cancel
Save