@@ -22,14 +22,8 @@ use graphene_std::vector::{HandleExt, PointId, SegmentId, Vector, VectorModifica
2222use kurbo:: { CubicBez , DEFAULT_ACCURACY , Line , ParamCurve , PathSeg , Point , QuadBez , Shape } ;
2323
2424/// Determines if a path should be extended. Goal in viewport space. Returns the path and if it is extending from the start, if applicable.
25- pub fn should_extend (
26- document : & DocumentMessageHandler ,
27- goal : DVec2 ,
28- tolerance : f64 ,
29- layers : impl Iterator < Item = LayerNodeIdentifier > ,
30- preferences : & PreferencesMessageHandler ,
31- ) -> Option < ( LayerNodeIdentifier , PointId , DVec2 ) > {
32- closest_point ( document, goal, tolerance, layers, |_| false , preferences)
25+ pub fn should_extend ( document : & DocumentMessageHandler , goal : DVec2 , tolerance : f64 , layers : impl Iterator < Item = LayerNodeIdentifier > ) -> Option < ( LayerNodeIdentifier , PointId , DVec2 ) > {
26+ closest_point ( document, goal, tolerance, layers, |_| false )
3327}
3428
3529/// Determine the closest point to the goal point under max_distance.
@@ -40,7 +34,6 @@ pub fn closest_point<T>(
4034 max_distance : f64 ,
4135 layers : impl Iterator < Item = LayerNodeIdentifier > ,
4236 exclude : T ,
43- preferences : & PreferencesMessageHandler ,
4437) -> Option < ( LayerNodeIdentifier , PointId , DVec2 ) >
4538where
4639 T : Fn ( PointId ) -> bool ,
5043 for layer in layers {
5144 let viewspace = document. metadata ( ) . transform_to_viewport ( layer) ;
5245 let Some ( vector) = document. network_interface . compute_modified_vector ( layer) else { continue } ;
53- for id in vector. extendable_points ( preferences . vector_meshes ) {
46+ for id in vector. extendable_points ( ) {
5447 if exclude ( id) {
5548 continue ;
5649 }
0 commit comments