mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +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'>
|
<meta name='viewport' content='width=device-width, user-scalable=no, viewport-fit=cover, initial-scale=1'>
|
||||||
<style>
|
<style>
|
||||||
html {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
body {
|
body {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: Roboto, sans-serif;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
@ -63,7 +63,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {
|
|||||||
|
|
||||||
public connectedCallback() {
|
public connectedCallback() {
|
||||||
Object.assign(this.style, {
|
Object.assign(this.style, {
|
||||||
position: "absolute",
|
position: "fixed",
|
||||||
width: isTouch ? "100px" : "50px",
|
width: isTouch ? "100px" : "50px",
|
||||||
height: isTouch ? "100px" : "50px",
|
height: isTouch ? "100px" : "50px",
|
||||||
transform: "translate(-50%, -50%)",
|
transform: "translate(-50%, -50%)",
|
||||||
@ -147,11 +147,11 @@ class ActionHandler extends HTMLElement implements ActionHandler {
|
|||||||
let x;
|
let x;
|
||||||
let y;
|
let y;
|
||||||
if ((ev as TouchEvent).touches) {
|
if ((ev as TouchEvent).touches) {
|
||||||
x = (ev as TouchEvent).touches[0].pageX;
|
x = (ev as TouchEvent).touches[0].clientX;
|
||||||
y = (ev as TouchEvent).touches[0].pageY;
|
y = (ev as TouchEvent).touches[0].clientY;
|
||||||
} else {
|
} else {
|
||||||
x = (ev as MouseEvent).pageX;
|
x = (ev as MouseEvent).clientX;
|
||||||
y = (ev as MouseEvent).pageY;
|
y = (ev as MouseEvent).clientY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.hasHold) {
|
if (options.hasHold) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user