From 4b72399e8ffb7e7f70067c42c49525492b2db00c Mon Sep 17 00:00:00 2001 From: Larissa Smith Date: Thu, 8 Oct 2015 16:29:01 -0600 Subject: [PATCH] Use the right queue item's options when replacing an item. --- src/viewer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index af54b5f1..d60b5320 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1312,11 +1312,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, _this._loadQueue.splice(0, 1); if (queueItem.options.replace) { - var newIndex = _this.world.getIndexOfItem(options.replaceItem); + var newIndex = _this.world.getIndexOfItem(queueItem.options.replaceItem); if (newIndex != -1) { - options.index = newIndex; + queueItem.options.index = newIndex; } - _this.world.removeItem(options.replaceItem); + _this.world.removeItem(queueItem.options.replaceItem); } tiledImage = new $.TiledImage({