* 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>
15 lines
408 B
Vue
15 lines
408 B
Vue
<script lang="ts" setup>
|
|
import { Position, Handle, NodeProps, ValidConnectionFunc } from '~/index'
|
|
|
|
interface CustomNodeProps extends NodeProps {
|
|
id: string
|
|
isValidSourcePos: ValidConnectionFunc
|
|
}
|
|
|
|
const props = defineProps<CustomNodeProps>()
|
|
</script>
|
|
<template>
|
|
<Handle type="target" :position="Position.Left" :is-valid-connection="props.isValidSourcePos" />
|
|
<div>{{ props.id }}</div>
|
|
</template>
|