refactor(contexts): create connection context

This commit is contained in:
moklick
2019-08-01 16:05:10 +02:00
parent c6c65669e9
commit 7fc2acf0fb
14 changed files with 272 additions and 249 deletions
+2 -1
View File
@@ -37,7 +37,7 @@ class ReactGraph extends PureComponent {
return (
<div style={style} className="react-graph">
<Provider elements={elements} onConnect={onConnect}>
<Provider elements={elements}>
<GraphView
onLoad={onLoad}
onMove={onMove}
@@ -48,6 +48,7 @@ class ReactGraph extends PureComponent {
edgeTypes={this.edgeTypes}
connectionLineType={connectionLineType}
connectionLineStyle={connectionLineStyle}
onConnect={onConnect}
/>
<GlobalKeyHandler
onElementsRemove={onElementsRemove}