fix: too many re-render on edges and nodes

This commit is contained in:
Braks
2021-10-20 09:23:00 +02:00
parent fede792a37
commit 17f2517ab4
7 changed files with 57 additions and 109 deletions

View File

@@ -17,14 +17,14 @@ const onConnect = (params: Connection | Edge) => (elements.value = addEdge(param
<template>
<Flow
:elements="elements"
:only-render-visible-elements="true"
:min-zoom="0.2"
:default-zoom="1.5"
@load="onLoad"
@elements-remove="onElementsRemove"
@connect="onConnect"
>
<MiniMap />
<Controls />
<Background />
<Background color="#aaa" :gap="8" />
</Flow>
</template>