Merge pull request #2560 from wbkd/neo-patch-4

Always elevate 1000 in `zIndex` when node is selected
This commit is contained in:
Moritz Klack
2022-11-15 11:55:54 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@reactflow/core': patch
---
Core: Always elevate zIndex when node is selected
+1 -1
View File
@@ -39,7 +39,7 @@ export function createNodeInternals(nodes: Node[], nodeInternals: NodeInternals)
const parentNodes: ParentNodes = {};
nodes.forEach((node) => {
const z = isNumeric(node.zIndex) ? node.zIndex : node.selected ? 1000 : 0;
const z = (isNumeric(node.zIndex) ? node.zIndex : 0) + (node.selected ? 1000 : 0);
const currInternals = nodeInternals.get(node.id);
const internals: Node = {