diff --git a/src/components/trace/hat-graph-node.ts b/src/components/trace/hat-graph-node.ts index 80bba78d74..2bad3be3e3 100644 --- a/src/components/trace/hat-graph-node.ts +++ b/src/components/trace/hat-graph-node.ts @@ -133,7 +133,7 @@ export class HatGraphNode extends LitElement { :host([nofocus]):host-context(.active), :host([nofocus]):host-context(:focus) { - --stroke-clr: var(--active-clr); + --circle-clr: var(--active-clr); --icon-clr: var(--default-icon-clr); } diff --git a/src/components/trace/hat-graph.ts b/src/components/trace/hat-graph.ts index fc8c3f28b2..8b7bed8b03 100644 --- a/src/components/trace/hat-graph.ts +++ b/src/components/trace/hat-graph.ts @@ -208,12 +208,6 @@ export class HatGraph extends LitElement { :host([disabled]) path.line { stroke: var(--disabled-clr); } - :host(.active) #top path.line { - stroke: var(--active-clr); - } - :host(:focus) #top path.line { - stroke: var(--active-clr); - } `; } } diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index 0fef57b294..7fdcbd203a 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -19,7 +19,6 @@ import { mdiArrowUp, mdiAsterisk, mdiCallSplit, - mdiCheckboxBlankOutline, mdiCheckBoxOutline, mdiChevronDown, mdiChevronRight, @@ -168,13 +167,19 @@ class HatScriptGraph extends LitElement { ${config.choose.map((branch, i) => { const branch_path = `${path}/choose/${i}`; + const track_this = + trace !== undefined && trace[0].result?.choice === i; + if (track_this) { + this.trackedNodes[branch_path] = { config, path: branch_path }; + } return html` ${ensureArray(branch.sequence).map((action, j) => @@ -184,14 +189,6 @@ class HatScriptGraph extends LitElement { `; })} - ${ensureArray(config.default)?.map((action, i) => this.render_node(action, `${path}/default/${i}`) )} @@ -410,7 +407,6 @@ class HatScriptGraph extends LitElement { protected render() { const paths = Object.keys(this.trackedNodes); - const manual_triggered = this.trace && "trigger" in this.trace.trace; let track_path = manual_triggered ? undefined : [0]; const trigger_nodes = ensureArray(this.trace.config.trigger).map(