Fix Pen and Freehand tool path extension (#1809)

Improve path tool extend
This commit is contained in:
James Lindsay
2024-07-07 17:23:44 -07:00
committed by GitHub
parent 4cd11448a0
commit 97616e8019
3 changed files with 11 additions and 7 deletions
@@ -5,7 +5,7 @@ use graphene_std::vector::PointId;
use glam::DVec2;
/// Determines if a path should be extended. Returns the path and if it is extending from the start, if applicable.
/// Determines if a path should be extended. Goal in viewport space. Returns the path and if it is extending from the start, if applicable.
pub fn should_extend(document: &DocumentMessageHandler, goal: DVec2, tolerance: f64) -> Option<(LayerNodeIdentifier, PointId, DVec2)> {
let mut best = None;
let mut best_distance_squared = tolerance * tolerance;