update: Add validConnectFunc as prop to handle
This commit is contained in:
@@ -16,6 +16,7 @@ const props = withDefaults(defineProps<HandleProps>(), {
|
||||
type: 'source',
|
||||
position: Position.Top,
|
||||
connectable: true,
|
||||
isValidConnection: () => true,
|
||||
})
|
||||
|
||||
const store = useStore()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user