Drop selectable and label distance, stop network graph rendered event bubbling

The MQTT map no longer needs them: nodeClickRadius makes the small topic
nodes easy to click. The rendered event fires on every frame and is only
listened to on the graph element itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
jbouwhandClaude Opus 5.5 committed 2026-12-01 14:49:31 +00:00
1 parent 8a6fe8cee1
commit ed8794a548
1 file changed
+4 -7
+4 -7
View File
@@ -40,12 +40,7 @@ export interface NetworkNode {
show?: boolean;
fontWeight?: "normal" | "bold";
fontSize?: number;
distance?: number;
};
/**
* False for a node that does not get the dark border of a clicked node
*/
selectable?: boolean;
fixed?: boolean;
/**
* Distance from the center, where 0 is the center and 1 is the edge
@@ -464,7 +459,6 @@ export class HaNetworkGraph extends LitElement {
? { ...node.itemStyle, borderWidth: 3 }
: node.itemStyle || {},
label: selected ? { ...node.label, fontWeight: "bold" } : node.label,
select: node.selectable === false ? { disabled: true } : undefined,
fixed: node.fixed || pinnedNodes.includes(node.id),
x: node.x,
y: node.y,
@@ -628,7 +622,10 @@ export class HaNetworkGraph extends LitElement {
// Fired for every drawn frame, so the page can place things next to nodes
// while the graph moves, and stays idle when it does not
private _handleRendered = () => {
fireEvent(this, "network-graph-rendered");
fireEvent(this, "network-graph-rendered", undefined, {
bubbles: false,
composed: false,
});
};
private _handleChartSetup() {