# HG changeset patch # User Sebastien Jodogne # Date 1670052434 -3600 # Node ID 7e45941acc1d06ae35fae56d3b5251a96e2314f0 # Parent f30d7055ed6af859fa6bfbbcf5e47fb78951f76b automatically open the first series to be loaded diff -r f30d7055ed6a -r 7e45941acc1d Applications/StoneWebViewer/NEWS --- a/Applications/StoneWebViewer/NEWS Sat Dec 03 08:12:14 2022 +0100 +++ b/Applications/StoneWebViewer/NEWS Sat Dec 03 08:27:14 2022 +0100 @@ -3,6 +3,7 @@ * Click-drag is available on the vertical slider * New URL argument "menu" to change the layout of the list of studies/series +* The first series to be loaded is now automatically opened * Annotations are grouped into one submenu for narrow screens * Fix measurement of arcs * Width of the vertical slider has doubled to ease user interactions diff -r f30d7055ed6a -r 7e45941acc1d Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Sat Dec 03 08:12:14 2022 +0100 +++ b/Applications/StoneWebViewer/WebApplication/app.js Sat Dec 03 08:27:14 2022 +0100 @@ -474,6 +474,7 @@ orthancSystem: {}, // Only available if "OrthancApiRoot" configuration option is set stoneWebViewerVersion: '...', emscriptenVersion: '...', + isFirstSeries: true, modalWarning: false, modalNotDiagnostic: false, @@ -1216,6 +1217,12 @@ var studyInstanceUid = args.detail.studyInstanceUid; var seriesInstanceUid = args.detail.seriesInstanceUid; that.UpdateIsSeriesComplete(studyInstanceUid, seriesInstanceUid); + + // Automatically open the first series to be loaded (new in Stone Web viewer 2.5) + if (that.isFirstSeries) { + that.SetViewportSeriesInstanceUid(1, seriesInstanceUid); + that.isFirstSeries = false; + } }); window.addEventListener('StoneAnnotationAdded', function() {