From 186ed376b3a084b71992b3f81d77b2d9f5d4c7a6 Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 29 Apr 2014 14:52:41 +0200 Subject: [PATCH] Fixed changed ranges not being deletable --- dist/vis.js | 4 ++-- src/timeline/component/ItemSet.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/vis.js b/dist/vis.js index ceac7dad..3e77199c 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -5060,7 +5060,7 @@ ItemSet.prototype._checkIfInvisible = function _checkIfInvisible(item) { * this function is very similar to the _checkIfInvisible() but it does not return booleans, hides the item if it should not be seen and always adds to the visibleItems. * this one is for brute forcing and hiding. * - * @param {itemRange | itemPoint | itemBox} item + * @param {Item} item * @param {array} visibleItems * @private */ @@ -5332,7 +5332,7 @@ ItemSet.prototype._onUpdate = function _onUpdate(ids) { } me.items[id] = item; - if (type == 'range') { + if (type == 'range' && me.visibleItems.indexOf(item) == -1) { me._checkIfVisible(item, me.visibleItems); } }); diff --git a/src/timeline/component/ItemSet.js b/src/timeline/component/ItemSet.js index e51f1e17..21044d55 100644 --- a/src/timeline/component/ItemSet.js +++ b/src/timeline/component/ItemSet.js @@ -331,7 +331,7 @@ ItemSet.prototype._checkIfInvisible = function _checkIfInvisible(item) { * this function is very similar to the _checkIfInvisible() but it does not return booleans, hides the item if it should not be seen and always adds to the visibleItems. * this one is for brute forcing and hiding. * - * @param {itemRange | itemPoint | itemBox} item + * @param {Item} item * @param {array} visibleItems * @private */ @@ -603,7 +603,7 @@ ItemSet.prototype._onUpdate = function _onUpdate(ids) { } me.items[id] = item; - if (type == 'range') { + if (type == 'range' && me.visibleItems.indexOf(item) == -1) { me._checkIfVisible(item, me.visibleItems); } });