Skip to content

Commit

Permalink
Fix ruler position is wrong when moving on the canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Dec 11, 2024
1 parent 534cdc8 commit 18799a2
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 82 deletions.
2 changes: 1 addition & 1 deletion app/lib/renderers/utilities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class UtilitiesRenderer extends Renderer<UtilitiesState> {

// Paint ruler background
canvas.save();
canvas.translate(-transform.position.dx, -transform.position.dy);
canvas.translate(transform.position.dx, transform.position.dy);
canvas.scale(1 / transform.size, 1 / transform.size);
canvas.translate(size.width / 2 + element.rulerPosition.x,
size.height / 2 + element.rulerPosition.y);
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1141,10 +1141,10 @@ packages:
dependency: transitive
description:
name: pub_semver
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.5"
pubspec_parse:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@astrojs/react": "^3.6.3",
"@astrojs/starlight": "^0.29.2",
"@phosphor-icons/react": "^2.1.7",
"@types/react": "^18.3.14",
"@types/react-dom": "^18.3.3",
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
"astro": "^4.16.17",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
Loading

0 comments on commit 18799a2

Please sign in to comment.