enterGroup method

void enterGroup(
  1. String groupId
)

Implementation

void enterGroup(String groupId) {
  final group = store.scene.shapeById(groupId);
  if (group?.source.type != Shapes.group) return;
  final existingIndex = groupFocusPath.indexOf(groupId);
  final nextPath = existingIndex >= 0
      ? groupFocusPath.take(existingIndex + 1).toList(growable: false)
      : [...groupFocusPath, groupId];
  setCanvasWorld(nextPath);
}