MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getAnchorPosition

Function getAnchorPosition

packages/ui/src/views/agentflowsv2/AgentFlowNode.jsx:89–100  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

87 }
88
89 const getAnchorPosition = (index) => {
90 const currentHeight = ref.current?.clientHeight || 0
91 const spacing = currentHeight / (getOutputAnchors().length + 1)
92 const position = spacing * (index + 1)
93
94 // Update node internals when we get a non-zero position
95 if (position > 0) {
96 updateNodeInternals(data.id)
97 }
98
99 return position
100 }
101
102 const getMinimumHeight = () => {
103 const outputCount = getOutputAnchors().length

Callers 1

AgentFlowNodeFunction · 0.70

Calls 1

getOutputAnchorsFunction · 0.70

Tested by

no test coverage detected