diff --git a/lib/timeline/component/Group.js b/lib/timeline/component/Group.js index 226ebab6..51e32ee2 100644 --- a/lib/timeline/component/Group.js +++ b/lib/timeline/component/Group.js @@ -388,7 +388,13 @@ Group.prototype.remove = function(item) { var index = this.visibleItems.indexOf(item); if (index != -1) this.visibleItems.splice(index, 1); - // TODO: also remove from ordered items? + if(item.data.subgroup !== undefined){ + var subgroup = this.subgroups[item.data.subgroup]; + if(subgroup){ + var itemIndex = subgroup.items.indexOf(item); + subgroup.items.splice(itemIndex,1); + } + } };