# HG changeset patch # User Sebastien Jodogne # Date 1647878261 -3600 # Node ID 05f0327d26c8cd60cc0dbf1ba4963bd34a444792 # Parent ed4831e08961eb85bc6325f2f1e286572577f098 added logs in app.js diff -r ed4831e08961 -r 05f0327d26c8 Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Mon Mar 21 15:50:29 2022 +0100 +++ b/Applications/StoneWebViewer/WebApplication/app.js Mon Mar 21 16:57:41 2022 +0100 @@ -186,21 +186,24 @@ var seriesInstanceUid = newVal.series.tags[SERIES_INSTANCE_UID]; stone.SpeedUpFetchSeriesMetadata(studyInstanceUid, seriesInstanceUid); - if ((newVal.series.type == stone.ThumbnailType.IMAGE || - newVal.series.type == stone.ThumbnailType.NO_PREVIEW) && - newVal.series.complete) { - this.status = 'ready'; - - var that = this; - Vue.nextTick(function() { - if (newVal.virtualSeriesId !== undefined && - newVal.virtualSeriesId.length > 0) { - stone.LoadVirtualSeriesInViewport(that.canvasId, newVal.virtualSeriesId); - } - else { - stone.LoadSeriesInViewport(that.canvasId, seriesInstanceUid); - } - }); + if (newVal.series.type == stone.ThumbnailType.IMAGE || + newVal.series.type == stone.ThumbnailType.NO_PREVIEW) { + if (newVal.series.complete) { + this.status = 'ready'; + + var that = this; + Vue.nextTick(function() { + if (newVal.virtualSeriesId !== undefined && + newVal.virtualSeriesId.length > 0) { + stone.LoadVirtualSeriesInViewport(that.canvasId, newVal.virtualSeriesId); + } + else { + stone.LoadSeriesInViewport(that.canvasId, seriesInstanceUid); + } + }); + } else { + console.warn('Series is incomplete: ' + seriesInstanceUid); + } } else if (newVal.series.type == stone.ThumbnailType.PDF) { if (newVal.series.complete) { @@ -249,6 +252,9 @@ console.warn('Videos are not supported by the Stone Web viewer alone yet, the Orthanc REST API is needed'); } } + else { + console.error('Unable to handle this series: ' + seriesInstanceUid); + } } }, mounted: function() {