double click to both exit and enter fullscreen
This commit is contained in:
parent
290687ff47
commit
e7f2b5ee0c
1 changed files with 6 additions and 1 deletions
|
@ -59,7 +59,12 @@ export default defineComponent({
|
||||||
zoomSpeed: 0.05,
|
zoomSpeed: 0.05,
|
||||||
zoomDoubleClickSpeed: 1,
|
zoomDoubleClickSpeed: 1,
|
||||||
onDoubleClick: function (e) {
|
onDoubleClick: function (e) {
|
||||||
document.body.requestFullscreen();
|
if (!document.fullscreenElement) {
|
||||||
|
document.body.requestFullscreen();
|
||||||
|
} else {
|
||||||
|
document.exitFullscreen();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue