fullscreen mode working (needs polish)

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-07-27 15:36:56 +03:00
parent e08abf0585
commit 02c468818e
2 changed files with 4 additions and 3 deletions

View File

@ -48,7 +48,7 @@
- Gallery: remove image
- <b>Gallery: serialize / deserialize</b>
- <s>Lightbox: navigation (keyboard / mouse)</s>
- Lightbox: fullscreen mode
- <s>Lightbox: fullscreen mode</s>
- Gallery: element (???)
- ...
</pre>

View File

@ -647,8 +647,9 @@ var Lightbox = {
this.dom.querySelector('.fullscreen')
.addEventListener('click', function(evt){
evt.stopPropagation()
// XXX
})
document.fullscreenElement ?
document.exitFullscreen()
: that.dom.requestFullscreen() })
// click...
var deadzone = this.navigation_deadzone ?? 100
this.dom