update: Add validConnectFunc as prop to handle

This commit is contained in:
Braks
2021-10-21 14:27:49 +02:00
parent 24316e1386
commit 0e79718720
2 changed files with 2 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ const props = withDefaults(defineProps<HandleProps>(), {
type: 'source',
position: Position.Top,
connectable: true,
isValidConnection: () => true,
})
const store = useStore()

View File

@@ -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,