|
@ -1196,14 +1196,6 @@ ItemSet.prototype._addItem = function(item) { |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
ItemSet.prototype._updateItem = function(item, itemData) { |
|
|
ItemSet.prototype._updateItem = function(item, itemData) { |
|
|
var oldGroupId = item.data.group; |
|
|
|
|
|
var oldSubGroupId = item.data.subgroup; |
|
|
|
|
|
|
|
|
|
|
|
if (oldGroupId != itemData.group) { |
|
|
|
|
|
var oldGroup = this.groups[oldGroupId]; |
|
|
|
|
|
if (oldGroup) oldGroup.remove(item); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// update the items data (will redraw the item when displayed)
|
|
|
// update the items data (will redraw the item when displayed)
|
|
|
item.setData(itemData); |
|
|
item.setData(itemData); |
|
|
|
|
|
|
|
@ -1214,14 +1206,6 @@ ItemSet.prototype._updateItem = function(item, itemData) { |
|
|
} else if (group && group.data && group.data.showNested) { |
|
|
} else if (group && group.data && group.data.showNested) { |
|
|
item.groupShowing = true; |
|
|
item.groupShowing = true; |
|
|
} |
|
|
} |
|
|
// update group
|
|
|
|
|
|
if (group) { |
|
|
|
|
|
if (oldGroupId != item.data.group) { |
|
|
|
|
|
group.add(item); |
|
|
|
|
|
} else if (oldSubGroupId != item.data.subgroup) { |
|
|
|
|
|
group.changeSubgroup(item, oldSubGroupId); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -1587,10 +1571,11 @@ ItemSet.prototype._moveToGroup = function(item, groupId) { |
|
|
var oldGroup = item.parent; |
|
|
var oldGroup = item.parent; |
|
|
oldGroup.remove(item); |
|
|
oldGroup.remove(item); |
|
|
oldGroup.order(); |
|
|
oldGroup.order(); |
|
|
|
|
|
|
|
|
|
|
|
item.data.group = group.groupId; |
|
|
|
|
|
|
|
|
group.add(item); |
|
|
group.add(item); |
|
|
group.order(); |
|
|
group.order(); |
|
|
|
|
|
|
|
|
item.data.group = group.groupId; |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|