From 0e797187205de728c8a4f611c2490dec3f0aa4fc Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 21 Oct 2021 14:27:49 +0200 Subject: [PATCH] update: Add validConnectFunc as prop to handle --- src/components/Handle/Handle.vue | 1 + src/container/ZoomPane/ZoomPane.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Handle/Handle.vue b/src/components/Handle/Handle.vue index 34097967..440f5f4e 100644 --- a/src/components/Handle/Handle.vue +++ b/src/components/Handle/Handle.vue @@ -16,6 +16,7 @@ const props = withDefaults(defineProps(), { type: 'source', position: Position.Top, connectable: true, + isValidConnection: () => true, }) const store = useStore() diff --git a/src/container/ZoomPane/ZoomPane.vue b/src/container/ZoomPane/ZoomPane.vue index a244fc80..7536e243 100644 --- a/src/container/ZoomPane/ZoomPane.vue +++ b/src/container/ZoomPane/ZoomPane.vue @@ -50,7 +50,7 @@ watch(height, (val) => (store.dimensions.height = val)) watch(transform, (val) => (store.transform = [val.x, val.y, val.zoom])) onMounted(() => { - const { zoomIn, zoomOut, zoomTo, transform: setTransform, fitView } = useZoomPanHelper(store) + const { zoomIn, zoomOut, zoomTo, transform: setTransform, fitView } = useZoomPanHelper() watchOnce( () => width.value && height.value,