Custom edge with sourcePosition and targetPosition #1748
Replies: 1 comment
-
Edge objects do not have a This option exists for default nodes (default, input, output) to determine what position the handle should have. const node = {
id: '1',
position: { ... },
sourcePosition: Position.Right, // puts the default source handle to the right
targetPosition: Position.Left, // puts the default target handle to the right
} Edge objects have a You are confusing this with <script lang="ts" setup>
// CustomEdge.vue
const props = defineProps<EdgeProps>();
console.log(props.sourcePosition) // logs the position of the source handle
console.log(props.targetPosition) // logs the position of the target handle If undefined or missing it will use the fallback positions of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a question regarding the edge properties: sourcePosition and targetPosition.
I have configured them as follows:
I added the VueFlow component in my view like this:
However, the default options for targetPosition and sourcePosition keep being applied:
As you can see, sourcePosition is "bottom" instead of sourcePosition: "right".
Does anyone have an idea of what I might be doing wrong?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions