From da54bc33167739616d19ce4114e36bf952d5cf65 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 10 Dec 2021 17:33:21 +0100 Subject: [PATCH] refactor(types)!: Remove Node/TranslateExtent * replace with CoordinateExtent Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- examples/Layouting/LayoutingExample.vue | 4 +- src/container/VueFlow/VueFlow.vue | 54 ++++++++++++++++++++++++- src/types/components.ts | 47 +++++++++++++++++++-- src/types/flow.ts | 17 +++----- src/types/node.ts | 2 + src/types/store.ts | 10 ++--- src/utils/graph.ts | 10 ++--- 7 files changed, 115 insertions(+), 29 deletions(-) diff --git a/examples/Layouting/LayoutingExample.vue b/examples/Layouting/LayoutingExample.vue index 9dc22db4..4ab9ba4c 100644 --- a/examples/Layouting/LayoutingExample.vue +++ b/examples/Layouting/LayoutingExample.vue @@ -12,7 +12,7 @@ import { Edge, Elements, isNode, - NodeExtent, + CoordinateExtent, Position, removeElements, } from '~/index' @@ -20,7 +20,7 @@ import { const dagreGraph = new dagre.graphlib.Graph() dagreGraph.setDefaultEdgeLabel(() => ({})) -const nodeExtent: NodeExtent = [ +const nodeExtent: CoordinateExtent = [ [0, -100], [1000, 500], ] diff --git a/src/container/VueFlow/VueFlow.vue b/src/container/VueFlow/VueFlow.vue index 8af73d9d..c71ce151 100644 --- a/src/container/VueFlow/VueFlow.vue +++ b/src/container/VueFlow/VueFlow.vue @@ -1,4 +1,16 @@