feat(rfInstance): add getElements function #274

This commit is contained in:
moklick
2020-06-02 16:06:08 +02:00
parent 02bcd1be11
commit 3f3a79b5f6
5 changed files with 26 additions and 2 deletions
+5 -1
View File
@@ -3,7 +3,11 @@ import React, { useState } from 'react';
import ReactFlow, { removeElements, addEdge, MiniMap, isNode, Controls, Background } from 'react-flow-renderer';
import { getElements } from './utils';
const onLoad = reactFlowInstance => reactFlowInstance.fitView();
const onLoad = reactFlowInstance => {
reactFlowInstance.fitView();
console.log(reactFlowInstance.getElements());
}
const initialElements = getElements(10, 10);