update: Add validConnectFunc as prop to handle
This commit is contained in:
@@ -16,6 +16,7 @@ const props = withDefaults(defineProps<HandleProps>(), {
|
|||||||
type: 'source',
|
type: 'source',
|
||||||
position: Position.Top,
|
position: Position.Top,
|
||||||
connectable: true,
|
connectable: true,
|
||||||
|
isValidConnection: () => true,
|
||||||
})
|
})
|
||||||
|
|
||||||
const store = useStore()
|
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]))
|
watch(transform, (val) => (store.transform = [val.x, val.y, val.zoom]))
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const { zoomIn, zoomOut, zoomTo, transform: setTransform, fitView } = useZoomPanHelper(store)
|
const { zoomIn, zoomOut, zoomTo, transform: setTransform, fitView } = useZoomPanHelper()
|
||||||
|
|
||||||
watchOnce(
|
watchOnce(
|
||||||
() => width.value && height.value,
|
() => width.value && height.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user