MCPcopy Create free account
hub / github.com/6174/comflowyspace / getNodePositionInGroup

Function getNodePositionInGroup

packages/common/utils/workflow.ts:23–30  ·  view source on GitHub ↗
(node: Node, containerNode: Node)

Source from the content-addressed store, hash-verified

21}
22
23export function getNodePositionInGroup(node: Node, containerNode: Node) {
24 const nodePosition = node.positionAbsolute ?? node.position ?? { x: 0, y: 0 };
25 console.log("real node Position", nodePosition, node.position, node.positionAbsolute);
26 nodePosition.x = nodePosition.x - containerNode.position.x;
27 nodePosition.y = nodePosition.y - containerNode.position.y;
28
29 return nodePosition;
30}
31
32export function getNodePositionOutOfGroup(node: Node, containerNode: Node) {
33 const nodePosition = node.position ?? { x: 0, y: 0 };

Callers 1

createHookFunction · 0.90

Calls 1

logMethod · 0.80

Tested by

no test coverage detected