feat(props): add mouse event to onNodeDragStart, onNodeDragStop, onElementClick, and onPaneClick

This commit is contained in:
Nate Amack
2020-08-04 12:05:03 -06:00
parent 0f79c3d978
commit 97ec24fa14
15 changed files with 51 additions and 48 deletions
+2 -2
View File
@@ -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 } },