fix(core): use connectable prop or global connectable in Handle
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { isFunction, isString } from '@vueuse/core'
|
||||
import type { Position } from '../../types'
|
||||
import type { HandleProps } from '../../types/handle'
|
||||
|
||||
const { position = 'top' as Position, connectable, id, isValidConnection, ...props } = defineProps<HandleProps>()
|
||||
const { position = 'top' as Position, connectable = true, id, isValidConnection, ...props } = defineProps<HandleProps>()
|
||||
|
||||
const type = toRef(props, 'type', 'source')
|
||||
|
||||
@@ -35,7 +35,7 @@ const isConnectable = computed(() => {
|
||||
return connectable(node, connectedEdges.value)
|
||||
}
|
||||
|
||||
return connectable || true
|
||||
return isDef(connectable) ? connectable : nodesConnectable
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user