diff --git a/components/NodeCard.vue b/components/NodeCard.vue index 11b7c22..75dafe6 100644 --- a/components/NodeCard.vue +++ b/components/NodeCard.vue @@ -4,6 +4,12 @@ import { Handle, Position } from '@vue-flow/core' const ignoreTypes = ["topics", "transparent"] + const positions = { + top: Position.Top, + left: Position.Left, + right: Position.Right, + bottom: Position.Bottom, + } const props = defineProps({ data: Object, @@ -32,24 +38,26 @@ console.log(node) }) - const checkSourceHandle = (ty) => { - return Object.values(props.data.sourcePosition || {}).includes(ty) - } - const checkTargetHandle = (ty) => { - return Object.values(props.data.targetPosition || {}).includes(ty) + const generateStyle = (handle, index) => { + return { [handle]: `${index * 10}px` } }