|
|
@ -600,12 +600,7 @@ ItemSet.prototype._updateUngrouped = function() { |
|
|
|
for (itemId in this.items) { |
|
|
|
if (this.items.hasOwnProperty(itemId)) { |
|
|
|
item = this.items[itemId]; |
|
|
|
if (item instanceof BackgroundItem) { |
|
|
|
background.add(item); |
|
|
|
} |
|
|
|
else { |
|
|
|
ungrouped.add(item); |
|
|
|
} |
|
|
|
ungrouped.add(item); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -776,8 +771,8 @@ ItemSet.prototype._getType = function (itemData) { |
|
|
|
*/ |
|
|
|
ItemSet.prototype._getGroupId = function (itemData) { |
|
|
|
var type = this._getType(itemData); |
|
|
|
if (type == 'background') { |
|
|
|
return this.groupsData && itemData.group != undefined ? itemData.group : BACKGROUND; |
|
|
|
if (type == 'background' && itemData.group == undefined) { |
|
|
|
return BACKGROUND; |
|
|
|
} |
|
|
|
else { |
|
|
|
return this.groupsData ? itemData.group : UNGROUPED; |
|
|
@ -1045,9 +1040,7 @@ ItemSet.prototype._removeItem = function(item) { |
|
|
|
if (index != -1) this.selection.splice(index, 1); |
|
|
|
|
|
|
|
// remove from group
|
|
|
|
var groupId = this._getGroupId(item.data); |
|
|
|
var group = this.groups[groupId]; |
|
|
|
if (group) group.remove(item); |
|
|
|
item.parent && item.parent.remove(item); |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|