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:
braks
2022-12-12 11:15:54 +01:00
committed by Braks
parent dc2ff6401d
commit 47432a8238
@@ -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(() => {