Merge pull request #2005 from RammasEchor/master

Flip the order in which view and navigator add a new item
This commit is contained in:
Ian Gilman 2021-07-08 11:06:48 -07:00 committed by GitHub
commit 4ce125993a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1502,6 +1502,17 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
if (_this.collectionMode) { if (_this.collectionMode) {
_this.world.setAutoRefigureSizes(false); _this.world.setAutoRefigureSizes(false);
} }
if (_this.navigator) {
optionsClone = $.extend({}, queueItem.options, {
replace: false, // navigator already removed the layer, nothing to replace
originalTiledImage: tiledImage,
tileSource: queueItem.tileSource
});
_this.navigator.addTiledImage(optionsClone);
}
_this.world.addItem( tiledImage, { _this.world.addItem( tiledImage, {
index: queueItem.options.index index: queueItem.options.index
}); });
@ -1515,16 +1526,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
_this.viewport.goHome(true); _this.viewport.goHome(true);
} }
if (_this.navigator) {
optionsClone = $.extend({}, queueItem.options, {
replace: false, // navigator already removed the layer, nothing to replace
originalTiledImage: tiledImage,
tileSource: queueItem.tileSource
});
_this.navigator.addTiledImage(optionsClone);
}
if (queueItem.options.success) { if (queueItem.options.success) {
queueItem.options.success({ queueItem.options.success({
item: tiledImage item: tiledImage