selectInBounds method
Selects all visible objects fully contained in bounds.
Implementation
bool selectInBounds(CanvasBounds bounds) {
final ids = <String>[];
for (final object in _objects) {
if (object.id == null || object.hidden) continue;
final objectBounds = _boundsFor(object);
if (objectBounds.left >= bounds.left &&
objectBounds.right <= bounds.right &&
objectBounds.top >= bounds.top &&
objectBounds.bottom <= bounds.bottom) {
ids.add(object.id!);
}
}
return selectMany(ids);
}