refactor(edges): default zIndex=0

This commit is contained in:
moklick
2022-04-30 16:11:25 +02:00
parent 6af190c272
commit b64d946454
5 changed files with 19 additions and 7 deletions
+2 -1
View File
@@ -37,6 +37,7 @@ interface EdgeRendererProps {
onEdgeUpdateEnd?: (event: MouseEvent, edge: Edge, handleType: HandleType) => void;
edgeUpdaterRadius?: number;
noPanClassName?: string;
isEdgeAutoZIndex: boolean;
}
const selector = (s: ReactFlowState) => ({
@@ -65,7 +66,7 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
connectionMode,
nodeInternals,
} = useStore(selector, shallow);
const edgeTree = useVisibleEdges(props.onlyRenderVisibleElements, nodeInternals);
const edgeTree = useVisibleEdges(props.onlyRenderVisibleElements, nodeInternals, props.isEdgeAutoZIndex);
if (!width) {
return null;