Skip to content

Add voltage-level class to edge infos#412

Open
flomillot wants to merge 1 commit into
ayolab/add-per-element-thresholds-to-adaptive-zoomfrom
flomillot/add-voltage-level-class-to-edge-infos
Open

Add voltage-level class to edge infos#412
flomillot wants to merge 1 commit into
ayolab/add-per-element-thresholds-to-adaptive-zoomfrom
flomillot/add-voltage-level-class-to-edge-infos

Conversation

@flomillot

Copy link
Copy Markdown
Contributor

Context

Edge infos (arrows and value labels) live in a flat nad-edge-infos group and, unlike voltage level nodes and their labels, do not carry the voltage-level CSS class of the side they belong to. As a result, CSS rules that hide a voltage level (voltage-level filtering, zoom-based hiding) leave these arrows and labels visible.

Change

Copy the voltage-level class(es) of the relevant node onto each edge info:

  • edgeInfo1node1, edgeInfo2node2, edgeInfoMiddlenode1, injections ← vlNodeId.
  • Applied to the server-rendered SVG at init, and when edge infos are recreated through setBranchSideLabel / setBranchMiddleLabel (e.g. during adaptive zoom updates).

Based on #409 (per-element thresholds to adaptive zoom), since that PR removes and recreates edge infos during zoom, so the recreation path must re-apply the class.

Notes

The node class is the source of truth (same class already carried by the voltage level label), so the naming scheme stays configurable server-side.

Edge infos (arrows and value labels) live in a flat 'nad-edge-infos' group
and, unlike voltage level nodes and their labels, did not carry the
voltage-level CSS class of the side they belong to. As a result, CSS rules
that hide a voltage level (voltage-level filtering, zoom-based hiding) left
these arrows and labels visible.

Copy the voltage-level class(es) of the relevant node onto each edge info,
both for the server-rendered SVG at init and when edge infos are recreated
during adaptive zoom updates.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@flomillot flomillot requested a review from ayolab June 12, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant