Add timeout for navigator item index change handler. Fix for issue# 1130

This commit is contained in:
vin 2017-05-22 17:12:09 +05:30
parent 52525f6697
commit 4eca8aca98

View File

@ -231,8 +231,10 @@ $.Navigator = function( options ){
});
viewer.world.addHandler("item-index-change", function(event) {
var item = _this.world.getItemAt(event.previousIndex);
_this.world.setItemIndex(item, event.newIndex);
window.setTimeout(function(){
var item = _this.world.getItemAt(event.previousIndex);
_this.world.setItemIndex(item, event.newIndex);
}, 1);
});
viewer.world.addHandler("remove-item", function(event) {