mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 14:54:12 +00:00
@@ -28,6 +28,7 @@ export interface Bounds {
|
||||
|
||||
// ID types for type safety
|
||||
export type NodeId = string
|
||||
export type SlotId = string
|
||||
export type ConnectionId = string
|
||||
|
||||
// Layout data structures
|
||||
@@ -41,12 +42,18 @@ export interface NodeLayout {
|
||||
bounds: Bounds
|
||||
}
|
||||
|
||||
export interface SlotLayout {
|
||||
id: SlotId
|
||||
nodeId: NodeId
|
||||
position: Point // Relative to node
|
||||
type: 'input' | 'output'
|
||||
index: number
|
||||
}
|
||||
|
||||
export interface ConnectionLayout {
|
||||
id: ConnectionId
|
||||
sourceNodeId: NodeId
|
||||
sourceSlotIndex: number
|
||||
targetNodeId: NodeId
|
||||
targetSlotIndex: number
|
||||
sourceSlot: SlotId
|
||||
targetSlot: SlotId
|
||||
// Control points for curved connections
|
||||
controlPoints?: Point[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user