Feature: Draggable edge

This commit is contained in:
Long Nguyen
2020-10-12 21:34:35 +09:00
parent f27634ebe2
commit bd63a0131a
13 changed files with 6583 additions and 9 deletions
+7
View File
@@ -105,6 +105,7 @@ const BasicFlow = () => <ReactFlow elements={elements} />;
- `onPaneClick(event: MouseEvent)`: called when user clicks directly on the canvas
- `onPaneContextMenu(event: MouseEvent)`: called when user does a right-click on the canvas
- `onPaneScroll(event: WheelEvent)`: called when user scrolls pane (only works when `zoomOnScroll` is set to `false)
- `onEdgeUpdate(oldEdge: Edge, newConnection: Connection)`: called when user press at either end of the edge and point to the target node
#### Interaction
- `nodesDraggable`: default: `true`. This applies to all nodes. You can also change the behavior of a specific node with the `draggable` node option
@@ -586,6 +587,12 @@ Returns an array with elements with the added edge.
`addEdge = (edgeParams: Edge, elements: Elements): Elements`
### updateEdge
Returns an array with elements with the updated edge.
`updateEdge = (oldEdge: Edge, newConnection: Connection, elements: Elements): Elements`
### getOutgoers
Returns all direct child nodes of the passed node.