From 101a734aaf689896161e86224ff367a01a74b124 Mon Sep 17 00:00:00 2001 From: endevea Date: Thu, 22 Jun 2017 13:43:34 +0800 Subject: [PATCH 1/2] process ready items always even if others fail --- .eslintrc.json | 2 +- src/viewer.js | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7e027656..7f71c301 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,7 +10,7 @@ ], "linebreak-style": [ "error", - "unix" + "windows" ], "quotes": [ "off", diff --git a/src/viewer.js b/src/viewer.js index 64f9490e..46321afd 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1383,11 +1383,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, this._loadQueue.push(myQueueItem); - getTileSourceImplementation( this, options.tileSource, options, function( tileSource ) { - - myQueueItem.tileSource = tileSource; - - // add everybody at the front of the queue that's ready to go + function processReadyItems() { var queueItem, tiledImage, optionsClone; while (_this._loadQueue.length) { queueItem = _this._loadQueue[0]; @@ -1473,9 +1469,20 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, }); } } + } + + getTileSourceImplementation( this, options.tileSource, options, function( tileSource ) { + + myQueueItem.tileSource = tileSource; + + // add everybody at the front of the queue that's ready to go + processReadyItems(); }, function( event ) { event.options = options; raiseAddItemFailed(event); + + // add everybody at the front of the queue that's ready to go + processReadyItems(); } ); }, From 4cb9dead8956915f4e51d86dbeca5ca133f7345b Mon Sep 17 00:00:00 2001 From: endevea Date: Sat, 24 Jun 2017 16:58:33 +0800 Subject: [PATCH 2/2] Reverted eslintrc rule to unix cflf --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7f71c301..7e027656 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,7 +10,7 @@ ], "linebreak-style": [ "error", - "windows" + "unix" ], "quotes": [ "off",