Set z-index via CSS

This commit is contained in:
RunDevelopment
2022-05-22 12:13:31 +02:00
parent b2ccf1d002
commit 225298447d
2 changed files with 5 additions and 10 deletions
+1 -10
View File
@@ -73,18 +73,9 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
return null;
}
const { connectionLineType, defaultMarkerColor, connectionLineStyle, connectionLineComponent } = props;
const { connectionLineType, defaultMarkerColor, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle } = props;
const renderConnectionLine = connectionNodeId && connectionHandleType;
let { connectionLineContainerStyle } = props
if (connectionLineContainerStyle?.zIndex === undefined) {
// if not set already, set the zIndex to the max level of the any edge
connectionLineContainerStyle = {
...connectionLineContainerStyle,
zIndex: edgeTree.find(({ isMaxLevel }) => isMaxLevel)?.level
}
}
return (
<>
{edgeTree.map(({ level, edges, isMaxLevel }) => (
+4
View File
@@ -36,6 +36,10 @@
overflow: visible;
}
.react-flow .react-flow__connectionline {
z-index: 1001;
}
.react-flow__edge {
pointer-events: visibleStroke;