Set z-index via CSS
This commit is contained in:
@@ -73,18 +73,9 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { connectionLineType, defaultMarkerColor, connectionLineStyle, connectionLineComponent } = props;
|
const { connectionLineType, defaultMarkerColor, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle } = props;
|
||||||
const renderConnectionLine = connectionNodeId && connectionHandleType;
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
{edgeTree.map(({ level, edges, isMaxLevel }) => (
|
{edgeTree.map(({ level, edges, isMaxLevel }) => (
|
||||||
|
|||||||
@@ -36,6 +36,10 @@
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.react-flow .react-flow__connectionline {
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
|
|
||||||
.react-flow__edge {
|
.react-flow__edge {
|
||||||
pointer-events: visibleStroke;
|
pointer-events: visibleStroke;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user