Mercurial > hg > orthanc-stone
comparison Applications/StoneWebViewer/WebApplication/app.js @ 2162:4f224edac348 default tip
Remember the previous layout when re-opening the viewer
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Thu, 03 Oct 2024 09:53:54 +0200 |
parents | 16c01cc201e7 |
children |
comparison
equal
deleted
inserted
replaced
2157:917e40af6b45 | 2162:4f224edac348 |
---|---|
958 this.HideViewport(3); | 958 this.HideViewport(3); |
959 this.HideViewport(4); | 959 this.HideViewport(4); |
960 this.layoutCountX = 1; | 960 this.layoutCountX = 1; |
961 this.layoutCountY = 2; | 961 this.layoutCountY = 2; |
962 } | 962 } |
963 | 963 localStorage.setItem('layout', layout); |
964 this.FitContent(); | 964 this.FitContent(); |
965 }, | 965 }, |
966 | 966 |
967 UpdateSeriesThumbnail: function(seriesInstanceUid) { | 967 UpdateSeriesThumbnail: function(seriesInstanceUid) { |
968 if (seriesInstanceUid in this.seriesIndex) { | 968 if (seriesInstanceUid in this.seriesIndex) { |
1367 }, | 1367 }, |
1368 | 1368 |
1369 mounted: function() { | 1369 mounted: function() { |
1370 // Warning: In this function, the "stone" global object is not initialized yet! | 1370 // Warning: In this function, the "stone" global object is not initialized yet! |
1371 | 1371 |
1372 this.SetViewportLayout('1x1'); | 1372 if (localStorage.layout) { |
1373 this.SetViewportLayout(localStorage.layout); | |
1374 } else { | |
1375 this.SetViewportLayout('1x1'); | |
1376 } | |
1373 | 1377 |
1374 if (localStorage.settingNotDiagnostic) { | 1378 if (localStorage.settingNotDiagnostic) { |
1375 this.settingNotDiagnostic = (localStorage.settingNotDiagnostic == '1'); | 1379 this.settingNotDiagnostic = (localStorage.settingNotDiagnostic == '1'); |
1376 } | 1380 } |
1377 | 1381 |