diff --git a/src/container/EdgeRenderer/index.tsx b/src/container/EdgeRenderer/index.tsx
index f59f1e5d..1936a712 100644
--- a/src/container/EdgeRenderer/index.tsx
+++ b/src/container/EdgeRenderer/index.tsx
@@ -25,6 +25,7 @@ interface EdgeRendererProps {
connectionLineType: ConnectionLineType;
connectionLineStyle?: CSSProperties;
connectionLineComponent?: ConnectionLineComponent;
+ connectionLineContainerStyle?: CSSProperties;
onEdgeClick?: (event: React.MouseEvent, node: Edge) => void;
onEdgeDoubleClick?: (event: React.MouseEvent, edge: Edge) => void;
defaultMarkerColor: string;
@@ -73,7 +74,13 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
return null;
}
- const { connectionLineType, defaultMarkerColor, connectionLineStyle, connectionLineComponent } = props;
+ const {
+ connectionLineType,
+ defaultMarkerColor,
+ connectionLineStyle,
+ connectionLineComponent,
+ connectionLineContainerStyle,
+ } = props;
const renderConnectionLine = connectionNodeId && connectionHandleType;
return (
@@ -180,22 +187,31 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
/>
);
})}
- {renderConnectionLine && isMaxLevel && (
-
- )}
))}
+ {renderConnectionLine && (
+
+ )}
>
);
};
diff --git a/src/container/FlowRenderer/index.tsx b/src/container/FlowRenderer/index.tsx
index d9352003..faae8f49 100644
--- a/src/container/FlowRenderer/index.tsx
+++ b/src/container/FlowRenderer/index.tsx
@@ -19,6 +19,7 @@ interface FlowRendererProps
| 'edgeTypes'
| 'snapGrid'
| 'connectionLineType'
+ | 'connectionLineContainerStyle'
| 'arrowHeadColor'
| 'onlyRenderVisibleElements'
| 'selectNodesOnDrag'
diff --git a/src/container/GraphView/index.tsx b/src/container/GraphView/index.tsx
index f39cf1bd..e5db5604 100644
--- a/src/container/GraphView/index.tsx
+++ b/src/container/GraphView/index.tsx
@@ -50,6 +50,7 @@ const GraphView = ({
connectionLineType,
connectionLineStyle,
connectionLineComponent,
+ connectionLineContainerStyle,
selectionKeyCode,
multiSelectionKeyCode,
zoomActivationKeyCode,
@@ -125,6 +126,7 @@ const GraphView = ({
connectionLineType={connectionLineType}
connectionLineStyle={connectionLineStyle}
connectionLineComponent={connectionLineComponent}
+ connectionLineContainerStyle={connectionLineContainerStyle}
onEdgeUpdate={onEdgeUpdate}
onlyRenderVisibleElements={onlyRenderVisibleElements}
onEdgeContextMenu={onEdgeContextMenu}
diff --git a/src/container/ReactFlow/index.tsx b/src/container/ReactFlow/index.tsx
index 269e5b8e..681e8abb 100644
--- a/src/container/ReactFlow/index.tsx
+++ b/src/container/ReactFlow/index.tsx
@@ -90,6 +90,7 @@ const ReactFlow = forwardRef(
connectionLineType = ConnectionLineType.Bezier,
connectionLineStyle,
connectionLineComponent,
+ connectionLineContainerStyle,
deleteKeyCode = 'Backspace',
selectionKeyCode = 'Shift',
multiSelectionKeyCode = 'Meta',
@@ -172,6 +173,7 @@ const ReactFlow = forwardRef(
connectionLineType={connectionLineType}
connectionLineStyle={connectionLineStyle}
connectionLineComponent={connectionLineComponent}
+ connectionLineContainerStyle={connectionLineContainerStyle}
selectionKeyCode={selectionKeyCode}
deleteKeyCode={deleteKeyCode}
multiSelectionKeyCode={multiSelectionKeyCode}
diff --git a/src/style.css b/src/style.css
index 0a725c6f..88fab950 100644
--- a/src/style.css
+++ b/src/style.css
@@ -36,6 +36,10 @@
overflow: visible;
}
+.react-flow .react-flow__connectionline {
+ z-index: 1001;
+}
+
.react-flow__edge {
pointer-events: visibleStroke;
diff --git a/src/types/component-props.ts b/src/types/component-props.ts
index 57b45804..309ba580 100644
--- a/src/types/component-props.ts
+++ b/src/types/component-props.ts
@@ -86,6 +86,7 @@ export interface ReactFlowProps extends HTMLAttributes {
connectionLineType?: ConnectionLineType;
connectionLineStyle?: CSSProperties;
connectionLineComponent?: ConnectionLineComponent;
+ connectionLineContainerStyle?: CSSProperties;
deleteKeyCode?: KeyCode | null;
selectionKeyCode?: KeyCode | null;
multiSelectionKeyCode?: KeyCode | null;