Fix overflow, change position of action-handler (#15978)

This commit is contained in:
Bram Kragten 2023-03-30 16:10:54 +02:00 committed by GitHub
parent ef10cc77f7
commit 0df096d68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -1,8 +1,6 @@
<meta name='viewport' content='width=device-width, user-scalable=no, viewport-fit=cover, initial-scale=1'>
<style>
html {
overflow: hidden;
}
body {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;

View File

@ -63,7 +63,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {
public connectedCallback() {
Object.assign(this.style, {
position: "absolute",
position: "fixed",
width: isTouch ? "100px" : "50px",
height: isTouch ? "100px" : "50px",
transform: "translate(-50%, -50%)",
@ -147,11 +147,11 @@ class ActionHandler extends HTMLElement implements ActionHandler {
let x;
let y;
if ((ev as TouchEvent).touches) {
x = (ev as TouchEvent).touches[0].pageX;
y = (ev as TouchEvent).touches[0].pageY;
x = (ev as TouchEvent).touches[0].clientX;
y = (ev as TouchEvent).touches[0].clientY;
} else {
x = (ev as MouseEvent).pageX;
y = (ev as MouseEvent).pageY;
x = (ev as MouseEvent).clientX;
y = (ev as MouseEvent).clientY;
}
if (options.hasHold) {