sendNodeToBack method
Sends a node to the back of the z-order (renders behind all other nodes).
Sets the node's z-index to be lower than all other nodes.
Parameters:
nodeId: The ID of the node to send to back
Example:
controller.sendNodeToBack('node1');
Implementation
void sendNodeToBack(String nodeId) {
final node = _nodes[nodeId];
if (node != null) {
runInAction(() {
// Set to lowest z-index
final minZIndex = _nodes.values
.map((n) => n.zIndex.value)
.fold(0, math.min);
node.zIndex.value = minZIndex - 1;
});
}
}