feat(wrapper): add onSelectionChange handler
This commit is contained in:
@@ -5,6 +5,7 @@ import ReactFlow, { removeElements, addEdge, MiniMap, Controls } from 'react-flo
|
||||
const onNodeDragStart = node => console.log('drag start', node);
|
||||
const onNodeDragStop = node => console.log('drag stop', node);
|
||||
const onElementClick = element => console.log('click', element);
|
||||
const onSelectionChange = elements => console.log('selection change', elements);
|
||||
const onLoad = (graph) => {
|
||||
console.log('graph loaded:', graph);
|
||||
graph.fitView();
|
||||
@@ -53,6 +54,7 @@ const OverviewFlow = () => {
|
||||
onConnect={onConnect}
|
||||
onNodeDragStart={onNodeDragStart}
|
||||
onNodeDragStop={onNodeDragStop}
|
||||
onSelectionChange={onSelectionChange}
|
||||
style={{ width: '100%', height: '100%' }}
|
||||
onLoad={onLoad}
|
||||
connectionLineStyle={{ stroke: '#ddd', strokeWidth: 2 }}
|
||||
|
||||
Reference in New Issue
Block a user