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

Function getAnchorPosition

packages/ui/src/views/agentflowsv2/IterationNode.jsx:97–108  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

95 }
96
97 const getAnchorPosition = (index) => {
98 const currentHeight = ref.current?.clientHeight || 0
99 const spacing = currentHeight / (getOutputAnchors().length + 1)
100 const position = spacing * (index + 1)
101
102 // Update node internals when we get a non-zero position
103 if (position > 0) {
104 updateNodeInternals(data.id)
105 }
106
107 return position
108 }
109
110 const getMinimumHeight = () => {
111 const outputCount = getOutputAnchors().length

Callers 1

IterationNodeFunction · 0.70

Calls 1

getOutputAnchorsFunction · 0.70

Tested by

no test coverage detected