Stop closing seadragon when going full screen

This commit is contained in:
Joe Knapper 2026-03-09 19:45:40 +00:00
parent 85eefcc903
commit 11d8c6d604

View file

@ -83,7 +83,8 @@ export default {
this.loadOpenSeaDragon(this.src); this.loadOpenSeaDragon(this.src);
} }
} else { } else {
if (this.osdViewer) { // Don't destroy if viewer is in fullscreen
if (this.osdViewer && !this.osdViewer.isFullPage()) {
this.osdViewer.destroy(); this.osdViewer.destroy();
this.osdViewer = null; this.osdViewer = null;
} }
@ -121,7 +122,12 @@ export default {
}, },
openFullscreen() { openFullscreen() {
if (this.osdViewer) { if (this.osdViewer) {
this.osdViewer.setFullScreen(true); // Wait a bit for DOM to resize
setTimeout(() => {
this.osdViewer.setFullScreen(true);
this.updateFilter();
this.osdViewer.forceRedraw();
}, 500);
} }
}, },
}, },