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); } });