feat(props): add onMoveStart and onMoveEnd #358

This commit is contained in:
moklick
2020-07-24 17:39:35 +02:00
parent d73105df61
commit b77977997b
5 changed files with 95 additions and 8 deletions
+3
View File
@@ -11,6 +11,8 @@ const onLoad = (reactFlowInstance) => {
reactFlowInstance.fitView();
};
const onMoveEnd = (transform) => console.log('zoom/move end', transform);
const initialElements = [
{
id: '1',
@@ -116,6 +118,7 @@ const OverviewFlow = () => {
onNodeDragStart={onNodeDragStart}
onNodeDragStop={onNodeDragStop}
onSelectionChange={onSelectionChange}
onMoveEnd={onMoveEnd}
style={{ width: '100%', height: '100%' }}
onLoad={onLoad}
connectionLineStyle={{ stroke: '#ddd' }}