diff --git a/src/components/nodes/StudioNode.vue b/src/components/nodes/StudioNode.vue index dea6115..9f68a76 100644 --- a/src/components/nodes/StudioNode.vue +++ b/src/components/nodes/StudioNode.vue @@ -8,7 +8,6 @@ import { NODE_TYPES } from '../../nodeTypes' const props = defineProps>() const typeDef = computed(() => NODE_TYPES[props.data.nodeType] ?? null) - const inputs = computed(() => typeDef.value?.ports.filter(p => p.direction === 'in') ?? []) const outputs = computed(() => typeDef.value?.ports.filter(p => p.direction === 'out') ?? []) @@ -21,22 +20,37 @@ const stateBadge = computed(() => { } }) -// Update a param value; Vue Flow tracks node data reactively +// Fixed layout constants (keep in sync with CSS) +const HEADER_H = 36 // px — node-header height +const PORT_H = 26 // px — port-row height + +// Handle is centered on its port row +function handleTopPx(index: number): string { + return `${HEADER_H + PORT_H * index + PORT_H / 2}px` +} + function setParam(key: string, value: string | number) { props.data.params[key] = value }