mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix trace graph for non-safari & safari (#19557)
This commit is contained in:
parent
3a204d889f
commit
623ac88166
@ -8,6 +8,7 @@ import {
|
|||||||
} from "lit";
|
} from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { NODE_SIZE, SPACING } from "./hat-graph-const";
|
import { NODE_SIZE, SPACING } from "./hat-graph-const";
|
||||||
|
import { isSafari } from "../../util/is_safari";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @attribute active
|
* @attribute active
|
||||||
@ -42,6 +43,7 @@ export class HatGraphNode extends LitElement {
|
|||||||
const width = SPACING + NODE_SIZE;
|
const width = SPACING + NODE_SIZE;
|
||||||
return html`
|
return html`
|
||||||
<svg
|
<svg
|
||||||
|
class=${isSafari ? "safari" : ""}
|
||||||
width="${width}px"
|
width="${width}px"
|
||||||
height="${height}px"
|
height="${height}px"
|
||||||
viewBox="-${Math.ceil(width / 2)} -${this.graphStart
|
viewBox="-${Math.ceil(width / 2)} -${this.graphStart
|
||||||
@ -125,6 +127,10 @@ export class HatGraphNode extends LitElement {
|
|||||||
:host([notEnabled]:hover) circle {
|
:host([notEnabled]:hover) circle {
|
||||||
--stroke-clr: var(--disabled-hover-clr);
|
--stroke-clr: var(--disabled-hover-clr);
|
||||||
}
|
}
|
||||||
|
svg:not(.safari) {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
circle,
|
circle,
|
||||||
path.connector {
|
path.connector {
|
||||||
stroke: var(--stroke-clr);
|
stroke: var(--stroke-clr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user