refactor(core): allow setting handleId in useNodeConnections (#1732)
* refactor(core): allow setting handleId in useNodeConnections Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): deprecate useHandleConnections Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(examples): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(docs): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(docs): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { Handle, Position, useHandleConnections, useNodeConnections, useNodesData } from '@vue-flow/core'
|
||||
import { Handle, Position, useNodeConnections, useNodesData } from '@vue-flow/core'
|
||||
|
||||
defineProps(['id'])
|
||||
|
||||
@@ -12,7 +12,7 @@ const mathFunctions = {
|
||||
}
|
||||
|
||||
// Get the source connections of the result node. In this example it's only one operator node.
|
||||
const sourceConnections = useHandleConnections({
|
||||
const sourceConnections = useNodeConnections({
|
||||
// type target means all connections where *this* node is the target
|
||||
// that means we go backwards in the graph to find the source of the connection(s)
|
||||
type: 'target',
|
||||
@@ -49,7 +49,6 @@ const result = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
{{ operatorSourceConnections }}
|
||||
<div class="calculation">
|
||||
<template v-for="(value, i) in valueData" :key="`${value.id}-${value.data}`">
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user