diff --git a/dlibrary/static/viewer.css b/dlibrary/static/viewer.css index 36c62ed..16c16a5 100644 --- a/dlibrary/static/viewer.css +++ b/dlibrary/static/viewer.css @@ -42,9 +42,12 @@ html, body { right: 0px; } -#tap-back, #tap-restart { +#tap-back, #tap-restart, #tap-fullscreen { left: 30vw; width: 40vw; +} + +#tap-back, #tap-restart { height: 20vh; } @@ -52,7 +55,7 @@ html, body { height: min(51%, 100px); } -#tap-restart svg { +#tap-restart svg, #tap-fullscreen svg { height: min(90%, 175px); } @@ -64,6 +67,11 @@ html, body { bottom: 0px; } +#tap-fullscreen { + height: 60vh; + top: 20vh; +} + .image-container img { position: fixed; left: 0; diff --git a/dlibrary/static/viewer.js b/dlibrary/static/viewer.js index a4986ac..e301916 100644 --- a/dlibrary/static/viewer.js +++ b/dlibrary/static/viewer.js @@ -193,6 +193,14 @@ document.addEventListener('DOMContentLoaded', () => { window.location.href = `../${INDEX}`; } + function fullscreen() { + if (document.fullscreenElement) { + document.exitFullscreen(); + } else { + document.body.requestFullscreen(); + } + } + function hideTapZones() { document.getElementById('controls').style.opacity = 0; } @@ -252,4 +260,5 @@ document.addEventListener('DOMContentLoaded', () => { document.getElementById("tap-right").onclick = right; document.getElementById("tap-restart").onclick = restart; document.getElementById("tap-back").onclick = exitToWork; + document.getElementById("tap-fullscreen").onclick = fullscreen; }); diff --git a/dlibrary/templates/viewer.html b/dlibrary/templates/viewer.html index 582549d..c571e2c 100644 --- a/dlibrary/templates/viewer.html +++ b/dlibrary/templates/viewer.html @@ -46,6 +46,14 @@ +
+ + + + + + +