validGroupFocusPath method
Implementation
List<String> validGroupFocusPath(List<String> path) {
final valid = <String>[];
String? expectedParent;
for (final id in path) {
final group = store.scene.shapeById(id);
if (group == null ||
group.source.type != Shapes.group ||
(expectedParent != null && group.source.parentId != expectedParent)) {
break;
}
valid.add(id);
expectedParent = id;
}
return List.unmodifiable(valid);
}