Skip to content

Commit 611b7e2

Browse files
bet
1 parent 827897b commit 611b7e2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/bifrost/components/BifrostCarbon.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ function addConnection(carbonId: string, childId: string, type: HookType, hookIn
108108
props.connections.push({
109109
id: 'connection-' + props.connections.length,
110110
type: isOutputInout ? 'output-input' : 'source-sink',
111+
orientation: isOutputInout ? 'horizontal' : 'vertical',
111112
output: {
112113
carbon: fromOutput ? carbonId : childId,
113114
hook: fromOutput ? hookIndex : 0

packages/bifrost/components/BifrostFibers.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ defineProps<{
1414
<BifrostFiber v-if="connection.output.component && connection.input.component"
1515
:ref="(e) => connection.component = e as FiberType"
1616
:fiber-start="connection.output.component?.outputs?.hooks[connection.output.hook]"
17-
:fiber-end="connection.input.component?.inputs?.hooks[connection.input.hook]" />
17+
:fiber-end="connection.input.component?.inputs?.hooks[connection.input.hook]"
18+
:orientation="connection.type === 'source-sink' ? 'vertical' : 'horizontal'" />
1819
</div>
1920
</template>

packages/bifrost/types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export interface BifrostFiberConnections {
1616
* - 'source-sink': Vertical connection (top-bottom sides of carbons)
1717
*/
1818
type: 'output-input' | 'source-sink'
19+
/** Orientation derived from type (horizontal for output-input, vertical for source-sink) */
20+
orientation?: 'horizontal' | 'vertical'
1921
/** Origin point of the connection */
2022
output: {
2123
/** ID of the carbon component this connection originates from */

0 commit comments

Comments
 (0)