resizeSelectedBy method
Resizes the selected object by dw, dh.
Implementation
bool resizeSelectedBy(double dw, double dh) {
if (_selectedObjectIds.isEmpty) return false;
_remember();
final changed = <CanvasObject>[];
for (final id in _selectedObjectIds) {
final index = _objects.indexWhere((object) => object.id == id);
if (index < 0) continue;
if (_objects[index].locked) continue;
final resized = _constrainObject(
_objects[index],
_resizeObject(_objects[index], dw, dh, constraints: constraints),
);
_objects[index] = resized;
changed.add(resized);
}
if (changed.isEmpty) return false;
render();
onResize?.call(List.unmodifiable(changed));
_emitChange();
return true;
}