bringNodeToFront method

void bringNodeToFront(
  1. String nodeId
)

Brings a node to the front of the z-order (renders on top of all other nodes).

Implementation

void bringNodeToFront(String nodeId) {
  final node = _nodes[nodeId];
  if (node != null) {
    runInAction(() {
      final maxZIndex = _nodes.values
          .map((n) => n.zIndex.value)
          .fold(0, math.max);
      node.zIndex.value = maxZIndex + 1;
    });
  }
}