feat(plugins): add minimap

This commit is contained in:
moklick
2019-08-05 16:43:14 +02:00
parent a53edd79cc
commit f90f3c26cd
7 changed files with 241 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import Graph, { isEdge, removeElements, getOutgoers, SourceHandle, TargetHandle } from '../src';
import Graph, { isEdge, removeElements, getOutgoers, SourceHandle, TargetHandle, MiniMap } from '../src';
// import Graph, { isEdge, removeElements, getOutgoers, SourceHandle, TargetHandle } from '../dist/ReactGraph';
const SpecialNode = ({ data, styles }) => (
@@ -141,10 +141,13 @@ class App extends PureComponent {
connectionLineStyle={{ stroke: '#ddd', strokeWidth: 2 }}
connectionLineType="bezier"
>
<MiniMap
style={{ position: 'absolute', right: 10, bottom: 10 }}
/>
<button
type="button"
onClick={() => this.onAdd()}
style={{ position: 'absolute', right: '10px', bottom: '10px', zIndex: 4 }}
style={{ position: 'absolute', right: 10, top: 10, zIndex: 4 }}
>
add
</button>