* docs(readme): add plugin section

* refactor(examples): use func components

* docs(readme): format

* refactor: NodeRenderer (#51)

* refactor: NodeRenderer

* fix getNodesInside partially param

* add `skipInvisible` prop

* refactor(noderenderer): rename skipInvisble to onlyRenderVisibleNodes

closes #40
This commit is contained in:
Moritz
2019-10-22 21:03:48 +02:00
committed by GitHub
parent 8ca5c0f84b
commit f85f2f8c9a
17 changed files with 402 additions and 2493 deletions
+3
View File
@@ -40,6 +40,7 @@ export interface GraphViewProps {
backgroundType: GridType;
snapToGrid: boolean;
snapGrid: [number, number];
onlyRenderVisibleNodes: boolean
}
const GraphView = memo(
@@ -63,6 +64,7 @@ const GraphView = memo(
onConnect,
snapToGrid,
snapGrid,
onlyRenderVisibleNodes
}: GraphViewProps) => {
const zoomPane = useRef<HTMLDivElement>(null);
const rendererNode = useRef<HTMLDivElement>(null);
@@ -136,6 +138,7 @@ const GraphView = memo(
nodeTypes={nodeTypes}
onElementClick={onElementClick}
onNodeDragStop={onNodeDragStop}
onlyRenderVisibleNodes={onlyRenderVisibleNodes}
/>
<EdgeRenderer
width={state.width}