feat(nodes): add onDragStart handler #241

This commit is contained in:
moklick
2020-05-25 12:14:47 +02:00
parent 3936062e8d
commit 5049379e3b
7 changed files with 33 additions and 13 deletions
+3
View File
@@ -19,6 +19,7 @@ export interface GraphViewProps {
elements: Elements;
onElementClick: (element: Node | Edge) => void;
onElementsRemove: (elements: Elements) => void;
onNodeDragStart: (node: Node) => void;
onNodeDragStop: (node: Node) => void;
onConnect: (connection: Connection | Edge) => void;
onLoad: OnLoadFunc;
@@ -46,6 +47,7 @@ const GraphView = memo(
onMove,
onLoad,
onElementClick,
onNodeDragStart,
onNodeDragStop,
connectionLineType,
connectionLineStyle,
@@ -140,6 +142,7 @@ const GraphView = memo(
nodeTypes={nodeTypes}
onElementClick={onElementClick}
onNodeDragStop={onNodeDragStop}
onNodeDragStart={onNodeDragStart}
onlyRenderVisibleNodes={onlyRenderVisibleNodes}
/>
<EdgeRenderer