Remove dynamic height/width calcs on graph nodes (#8832)

This commit is contained in:
Bram Kragten
2021-04-06 22:31:22 +02:00
committed by GitHub
parent 109910d18f
commit 3a4fffdb0b
4 changed files with 77 additions and 54 deletions

View File

@@ -49,6 +49,7 @@ import {
WaitForTriggerAction,
} from "../../data/script";
import { ensureArray } from "../../common/ensure-array";
import "./hat-graph-spacer";
declare global {
interface HASSDomEvents {
@@ -192,14 +193,12 @@ class HatScriptGraph extends LitElement {
`;
})}
<hat-graph>
<hat-graph-node
nofocus
spacer
<hat-graph-spacer
class=${classMap({
track:
trace !== undefined && trace[0].result?.choice === "default",
})}
></hat-graph-node>
></hat-graph-spacer>
${ensureArray(config.default)?.map((action, i) =>
this.render_node(action, `${path}/default/${i}`)
)}