-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved rendering order of nodes/edges in Graph View #2623
Conversation
.map(this.edgeScaleDecorator) | ||
.groupBy(this.edgeDisplayLayer); | ||
|
||
// NOTE: The elements need to be arranged into a single array outside |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM
@jpellizzari I noticed later how the focused edges were blinking due to the CSS |
@fbarl Looks reasonably smooth with no problems. LGTM. |
As a first step towards making #2431 work, we need to fix the rendering order of elements in
<NodesChart />
. The current order all edges -> all nodes doesn't look that bad as long as the background nodes are kept relatively transparent, but even so, on a closer look it can be seen how background nodes are rendered on top of foreground edges. This PR introduces a new rendering order:Since SVG 1.1 doesn't support anything like CSS
z-index
, and SVG 2.0 standard still seems far away, the SVG rendering order necessarily corresponds to the DOM order, so I had to collapse both components<NodesChartNodes />
and<NodesChartEdges />
into<NodesChartElements />
to make the lists of nodes and edges intertwined.No measurable performance loses were observed.
Now #2431 could be fixed e.g. by not making background nodes transparent, but changing their colors to similar effect.