* edge updater cannot discern a valid connection by itself so we allow an option to pass a valid connection func to nodes which will then be used to determine if updating connection is valid * it is optional, by default all connections are valid Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
13 lines
377 B
Vue
13 lines
377 B
Vue
<script lang="ts" setup>
|
|
import { Position, Handle, ValidConnectionFunc } from '~/index'
|
|
|
|
interface CustomInputProps {
|
|
isValidTargetPos: ValidConnectionFunc
|
|
}
|
|
const props = defineProps<CustomInputProps>()
|
|
</script>
|
|
<template>
|
|
<div>Only connectable with B</div>
|
|
<Handle type="source" :position="Position.Right" :is-valid-connection="props.isValidTargetPos" />
|
|
</template>
|