feat(props): add mouse event to onNodeDragStart, onNodeDragStop, onElementClick, and onPaneClick
This commit is contained in:
@@ -2,9 +2,9 @@ import React, { useState } from 'react';
|
||||
|
||||
import ReactFlow, { removeElements, addEdge, isNode, Background } from 'react-flow-renderer';
|
||||
|
||||
const onNodeDragStop = (node) => console.log('drag stop', node);
|
||||
const onNodeDragStop = (evt, node) => console.log('drag stop', node);
|
||||
const onLoad = (reactFlowInstance) => console.log('flow loaded:', reactFlowInstance);
|
||||
const onElementClick = (element) => console.log('click', element);
|
||||
const onElementClick = (evt, element) => console.log('click', element);
|
||||
|
||||
const initialElements = [
|
||||
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
|
||||
|
||||
Reference in New Issue
Block a user