refactor(edges): Make edge updating optional

* add an option to enable edge updating globally
* pass an option to an edge to enable updating for a single edge

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-26 11:08:12 +01:00
parent 98b6fdb717
commit 4630f3efc1
12 changed files with 48 additions and 27 deletions

View File

@@ -65,6 +65,7 @@ const toggleclasss = () => {
@connect="onConnect"
@node-drag-stop="onNodeDragStop"
@node-click="onElementClick"
@edge-update="log"
@load="onLoad"
>
<MiniMap />

View File

@@ -143,7 +143,7 @@ const onElementsRemove = (elementsToRemove: Elements) => (elements.value = remov
:snap-grid="snapGrid"
@element-click="onElementClick"
@elements-remove="onElementsRemove"
@eonnect="onConnect"
@connect="onConnect"
@pane-click="onPaneClick"
@pane-scroll="onPaneScroll"
@pane-contex-menu="onPaneContextMenu"
@@ -158,6 +158,7 @@ const onElementsRemove = (elementsToRemove: Elements) => (elements.value = remov
@selection-change="onSelectionChange"
@move-end="onMoveEnd"
@load="onLoad"
@edge-update="onEdgeMouseMove"
@edge-context-menu="onEdgeContextMenu"
@edge-mouse-enter="onEdgeMouseEnter"
@edge-mouse-move="onEdgeMouseMove"