mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix overflow, change position of action-handler (#15978)
This commit is contained in:
parent
ef10cc77f7
commit
0df096d68b
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user