Migration checklist
- Keep using
node.pos,node.size,boundingRect,getBounding(),setPos(),setSize(): no signature changes required. - Replace
repositionNodesVueMode()calls withapplyNodePositions(). - If you relied on
node.sizereflecting measured/rendered content, switch togetBounding()/boundingRect. With the Vue renderer,sizenow strictly reflects the requested value. The legacy renderer still growssizeto fit widgets. - Use the node/group geometry APIs, not the backing store; don’t import
layoutStoreor depend on its internal format. - Writes through a removed reference update the detached object, not shared layout state.
What changed
LGraphNode.pos, size, boundingRect, getBounding(), setPos(), and
setSize() keep the same signatures. These calls remain source-compatible.
Behavior changed in the three cases below.
size vs. rendered bounds
node.size is the size you requested, and what gets serialized. With the Vue
renderer, rendering never changes it. getBounding() and boundingRect return
the rendered bounds, which can be larger than size when widget content needs
more room. With the legacy canvas renderer, the node still grows to fit its
widgets by calling setSize(), so node.size and the saved size can change
after a draw. Use rendered bounds when you need the node’s actual on-screen
footprint.
The canvas recalculates getBounding() and boundingRect at the start of each
frame. After you change pos or size, call node.updateArea() before you
read them in the same frame. With the Vue renderer, growth from DOM content
appears only after the node has been measured.
repositionNodesVueMode() renamed to applyNodePositions()
repositionNodesVueMode() remains callable as a deprecated alias.