only edge scroll in fullscreen (enabled by double-click)
This commit is contained in:
parent
a6bc042876
commit
77e20afc61
2 changed files with 10 additions and 1 deletions
|
@ -18,6 +18,7 @@ export default defineComponent({
|
|||
<style>
|
||||
html, body {
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html, body, #app, #root {
|
||||
|
|
|
@ -39,7 +39,12 @@ export default defineComponent({
|
|||
// PanZoom
|
||||
const pz = createPanZoom(element, {
|
||||
smoothScroll: false,
|
||||
zoomSpeed: 0.05
|
||||
zoomSpeed: 0.05,
|
||||
zoomDoubleClickSpeed: 1,
|
||||
onDoubleClick: function (e) {
|
||||
document.body.requestFullscreen();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
panzoom.value = pz;
|
||||
|
||||
|
@ -51,6 +56,9 @@ export default defineComponent({
|
|||
window.addEventListener("mousemove", (ev) => {
|
||||
clearTimeout(edgeScrollInterval);
|
||||
edgeScrollInterval = undefined;
|
||||
if (!document.fullscreenElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
let horizontalShift: number;
|
||||
let verticalShift: number;
|
||||
|
|
Loading…
Reference in a new issue