(node: SDNode, handleId: string, handleType: string)
| 5 | * return slot value type of a normal node |
| 6 | */ |
| 7 | export function getValueTypeOfNodeSlot(node: SDNode, handleId: string, handleType: string): string { |
| 8 | let valueType = ""; |
| 9 | if (handleType === "source") { |
| 10 | const output = node.outputs.find(output => output.name.toUpperCase() === handleId); |
| 11 | if (output) { |
| 12 | valueType = output.type; |
| 13 | } |
| 14 | } else { |
| 15 | const input = node.inputs.find(input => input.name.toUpperCase() === handleId); |
| 16 | if (input) { |
| 17 | valueType = input.type; |
| 18 | } |
| 19 | } |
| 20 | return valueType; |
| 21 | } |
| 22 | |
| 23 | export function getNodePositionInGroup(node: Node, containerNode: Node) { |
| 24 | const nodePosition = node.positionAbsolute ?? node.position ?? { x: 0, y: 0 }; |
no outgoing calls
no test coverage detected