double click to both exit and enter fullscreen

This commit is contained in:
Tomáš Mládek 2021-01-10 22:04:42 +01:00
parent 290687ff47
commit e7f2b5ee0c

View file

@ -59,7 +59,12 @@ export default defineComponent({
zoomSpeed: 0.05, zoomSpeed: 0.05,
zoomDoubleClickSpeed: 1, zoomDoubleClickSpeed: 1,
onDoubleClick: function (e) { onDoubleClick: function (e) {
if (!document.fullscreenElement) {
document.body.requestFullscreen(); document.body.requestFullscreen();
} else {
document.exitFullscreen();
}
return true; return true;
} }
}); });