Add voltage-level class to edge infos#412
Open
flomillot wants to merge 1 commit into
Open
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Context
Edge infos (arrows and value labels) live in a flat
nad-edge-infosgroup 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:
edgeInfo1←node1,edgeInfo2←node2,edgeInfoMiddle←node1, injections ←vlNodeId.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.