Browse Source

Partly fixed issue with updating an item's subgroup (see #745)

v3_develop
jos 9 years ago
parent
commit
4f47608a27
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/timeline/component/ItemSet.js

+ 2
- 1
lib/timeline/component/ItemSet.js View File

@ -1027,12 +1027,13 @@ ItemSet.prototype._addItem = function(item) {
*/
ItemSet.prototype._updateItem = function(item, itemData) {
var oldGroupId = item.data.group;
var oldSubGroupId = item.data.subgroup;
// update the items data (will redraw the item when displayed)
item.setData(itemData);
// update group
if (oldGroupId != item.data.group) {
if (oldGroupId != item.data.group || oldSubGroupId != item.data.subgroup) {
var oldGroup = this.groups[oldGroupId];
if (oldGroup) oldGroup.remove(item);

Loading…
Cancel
Save