Skip to content

Commit

Permalink
Fix offset in scaling multiple elements, closes #506
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Oct 20, 2023
1 parent 2bd3dfa commit 9a3f2bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FLUTTER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.16.0-0.2.pre
3.16.0-0.3.pre
2 changes: 1 addition & 1 deletion app/lib/handlers/select.dart
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class SelectHandler extends Handler<SelectTool> {
var diff = oldPos - transformRect.topLeft;
// Scale and calculate relative position based on transformRect
var newPos =
-Offset(diff.dx * scaleX, diff.dy * scaleY) + position + diff;
Offset(diff.dx * (scaleX - 1), diff.dy * (scaleY - 1)) + position;
// Rotate around center
if (rotation != 0) {
final center = e.expandedRect?.center ?? Offset.zero;
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/76.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Fix home page header
* Fix offset in scaling multiple elements ([#506](https://github.com/LinwoodDev/Butterfly/issues/506))

View all changes in the blog: https://linwood.dev/butterfly/2.0.0-beta.12

0 comments on commit 9a3f2bb

Please sign in to comment.