Skip to content

Commit f89a901

Browse files
committed
re-index the display levels of edges and nodes
1 parent 2dab8e7 commit f89a901

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
4949
- uses now the `Markdown.cutOff` property
5050
- this enables Markdown rendering even if the preview need to be shortened
5151
- this may lead to slightly different preview lengths
52+
- `<StickyNoteNode />`
53+
- if not selected it always is displayed under other nodes and edges
54+
- it was necessary to set `z-index` on node and edge level, not for their containers
5255

5356
### Fixed
5457

‎src/cmem/react-flow/nodes/_stickynote.scss‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.react-flow__node-stickynote {
2+
&:not(.selected) {
3+
z-index: -2 !important;
4+
}
25
.#{$eccgui}-graphviz__node {
36
&:not(.#{$eccgui}-graphviz__node--minimal-rectangular),
47
&:not(.#{$eccgui}-graphviz__node--minimal-circular) {

‎src/extensions/react-flow/_react-flow_v12.scss‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@
6565

6666
.react-flow .react-flow__edges {
6767
position: absolute;
68+
69+
/* we handle z-index direct for individual edges to re-order them together with the nodes */
70+
z-index: unset;
71+
72+
& > svg[style*="z-index: 0"] {
73+
z-index: -1 !important;
74+
75+
&:has(g.selected) {
76+
z-index: 0 !important;
77+
}
78+
}
6879
}
6980

7081
.react-flow .react-flow__edges svg:not(.#{$eccgui}-icon) {
@@ -105,6 +116,10 @@ svg.react-flow__connectionline {
105116
transform-origin: 0 0;
106117
}
107118

119+
.react-flow .react-flow__nodes {
120+
z-index: unset;
121+
}
122+
108123
.react-flow__node {
109124
position: absolute;
110125
box-sizing: border-box;

0 commit comments

Comments
 (0)