Fix primitive tool shapes appearing at document origin before dragging; fix Ctrl+0 recenter shifting (#1751)

* fix ghost shape when starting to draw

* fix indeterminate recenter

* fix typo infinate

* cargo fmt

* Code review and add to Line tool

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Elbert Ronnie 2024-05-22 15:01:26 +05:30 committed by GitHub
parent af6dae29fc
commit 4587457bfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 43 additions and 7 deletions

View file

@ -586,7 +586,7 @@ impl Bezier {
Bezier::from_cubic_dvec2(self.end, handle1, handle2, other.start)
}
/// Compute the winding order (number of times crossing an infinate line to the left of the point)
/// Compute the winding order (number of times crossing an infinite line to the left of the point)
///
/// Assumes curve is split at the extrema.
fn pre_split_winding_number(&self, target_point: DVec2) -> i32 {