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>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body, #app, #root {
|
html, body, #app, #root {
|
||||||
|
|
|
@ -39,7 +39,12 @@ export default defineComponent({
|
||||||
// PanZoom
|
// PanZoom
|
||||||
const pz = createPanZoom(element, {
|
const pz = createPanZoom(element, {
|
||||||
smoothScroll: false,
|
smoothScroll: false,
|
||||||
zoomSpeed: 0.05
|
zoomSpeed: 0.05,
|
||||||
|
zoomDoubleClickSpeed: 1,
|
||||||
|
onDoubleClick: function (e) {
|
||||||
|
document.body.requestFullscreen();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
panzoom.value = pz;
|
panzoom.value = pz;
|
||||||
|
|
||||||
|
@ -51,6 +56,9 @@ export default defineComponent({
|
||||||
window.addEventListener("mousemove", (ev) => {
|
window.addEventListener("mousemove", (ev) => {
|
||||||
clearTimeout(edgeScrollInterval);
|
clearTimeout(edgeScrollInterval);
|
||||||
edgeScrollInterval = undefined;
|
edgeScrollInterval = undefined;
|
||||||
|
if (!document.fullscreenElement) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let horizontalShift: number;
|
let horizontalShift: number;
|
||||||
let verticalShift: number;
|
let verticalShift: number;
|
||||||
|
|
Loading…
Reference in a new issue