fix: valid connection func in handle
This commit is contained in:
@@ -16,7 +16,6 @@ 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()
|
||||||
@@ -25,7 +24,7 @@ const nodeId = inject(NodeIdContextKey)!
|
|||||||
|
|
||||||
const handler = useHandle()
|
const handler = useHandle()
|
||||||
const onMouseDownHandler = (event: MouseEvent) =>
|
const onMouseDownHandler = (event: MouseEvent) =>
|
||||||
handler(event, props.id, nodeId, props.type === 'target', props.isValidConnection)
|
handler(event, props.id, nodeId, props.type === 'target', props.isValidConnection ?? (() => true))
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user