Fix trace graph for non-safari & safari (#19557)

This commit is contained in:
karwosts 2024-01-30 07:23:53 -05:00 committed by GitHub
parent 3a204d889f
commit 623ac88166
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@ import {
} from "lit";
import { customElement, property } from "lit/decorators";
import { NODE_SIZE, SPACING } from "./hat-graph-const";
import { isSafari } from "../../util/is_safari";
/**
* @attribute active
@ -42,6 +43,7 @@ export class HatGraphNode extends LitElement {
const width = SPACING + NODE_SIZE;
return html`
<svg
class=${isSafari ? "safari" : ""}
width="${width}px"
height="${height}px"
viewBox="-${Math.ceil(width / 2)} -${this.graphStart
@ -125,6 +127,10 @@ export class HatGraphNode extends LitElement {
:host([notEnabled]:hover) circle {
--stroke-clr: var(--disabled-hover-clr);
}
svg:not(.safari) {
width: 100%;
height: 100%;
}
circle,
path.connector {
stroke: var(--stroke-clr);