feat(edge): add onEdgeContextMenu handler #943

This commit is contained in:
moklick
2021-02-26 10:51:25 +01:00
parent c7b04dbc0f
commit 0d1d802ed5
6 changed files with 45 additions and 23 deletions
+2
View File
@@ -29,6 +29,7 @@ interface EdgeRendererProps {
markerEndId?: string;
onlyRenderVisibleElements: boolean;
onEdgeUpdate?: OnEdgeUpdateFunc;
onEdgeContextMenu?: (event: React.MouseEvent, element: Edge) => void;
}
interface EdgeWrapperProps {
@@ -163,6 +164,7 @@ const Edge = ({
isHidden={edge.isHidden}
onConnectEdge={onConnectEdge}
handleEdgeUpdate={typeof props.onEdgeUpdate !== 'undefined'}
onContextMenu={props.onEdgeContextMenu}
/>
);
};