Skip to content

Commit

Permalink
Fix layer space multiplication error
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgerhant authored and Keavon committed Oct 26, 2024
1 parent 10a4227 commit 7154d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/src/messages/tool/tool_messages/pen_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl PenToolData {

// Break the control
let Some(last_pos) = self.latest_point().map(|point| point.pos) else { return };
let transform = document.metadata().document_to_viewport * transform;
let transform = transform * document.metadata().document_to_viewport;
let on_top = transform.transform_point2(self.next_point).distance_squared(transform.transform_point2(last_pos)) < crate::consts::SNAP_POINT_TOLERANCE.powi(2);
if on_top {
if let Some(point) = self.latest_point_mut() {
Expand Down

0 comments on commit 7154d73

Please sign in to comment.