From 26b3901bd5fcde8c168a7bef1e189736f93765d4 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 22 Oct 2021 08:16:32 +0200 Subject: [PATCH] fix: node not updating handlebounds when handle pos changes * watch source & target pos and update node dimensions on next tick --- examples/Layouting/LayoutingExample.vue | 17 +++++++++++++-- src/components/Edges/Edge.vue | 28 ++++++++++++------------- src/components/Nodes/Node.vue | 22 ++++++++++++------- src/container/Flow/Flow.vue | 2 +- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/examples/Layouting/LayoutingExample.vue b/examples/Layouting/LayoutingExample.vue index 3867c65c..e4182480 100644 --- a/examples/Layouting/LayoutingExample.vue +++ b/examples/Layouting/LayoutingExample.vue @@ -3,7 +3,18 @@ import dagre from 'dagre' import initialElements from './initial-elements' import './layouting.css' -import Flow, { Controls, addEdge, Connection, Edge, Elements, isNode, NodeExtent, Position, removeElements } from '~/index' +import Flow, { + Controls, + addEdge, + ConnectionMode, + Connection, + Edge, + Elements, + isNode, + NodeExtent, + Position, + removeElements, +} from '~/index' const dagreGraph = new dagre.graphlib.Graph() dagreGraph.setDefaultEdgeLabel(() => ({})) @@ -42,6 +53,7 @@ const onLayout = (direction: string) => { return el }) + console.log(elements.value) }