feat(nodes): add option to pass a valid target pos / valid source pos func to nodes
* 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>
This commit is contained in:
@@ -22,7 +22,7 @@ const nodeId = inject(NodeId, '')
|
||||
|
||||
const handler = useHandle()
|
||||
const onMouseDownHandler = (event: MouseEvent) =>
|
||||
handler(event, props.id, nodeId, props.type === 'target', props.isValidConnection ?? (() => true))
|
||||
handler(event, props.id, nodeId, props.type === 'target', props.isValidConnection)
|
||||
</script>
|
||||
<script lang="ts">
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user