Insert point on segment by clicking once (no more sliding) and Alt+click to delete a segment (#2495)

* segment overlay change

* Segment split and delete

* Cleanup

* graceful handling of edge cases

* Moved constants to conts.rs and tuned the threshold

* Remove going into another state

* Insert point mode cleanup

* Linting fix

* Code review

* Added hints

* Added field for delete segment

* Change controls and fix too far logic

* Fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Adesh Gupta
2025-04-30 01:03:24 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 478ace3349
commit da38f672ae
4 changed files with 138 additions and 127 deletions
+2 -1
View File
@@ -99,8 +99,9 @@ pub const MIN_LENGTH_FOR_SKEW_TRIANGLE_VISIBILITY: f64 = 48.;
pub const MANIPULATOR_GROUP_MARKER_SIZE: f64 = 6.;
pub const SELECTION_THRESHOLD: f64 = 10.;
pub const HIDE_HANDLE_DISTANCE: f64 = 3.;
pub const INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE: f64 = 50.;
pub const HANDLE_ROTATE_SNAP_ANGLE: f64 = 15.;
pub const SEGMENT_INSERTION_DISTANCE: f64 = 7.5;
pub const SEGMENT_OVERLAY_SIZE: f64 = 10.;
// PEN TOOL
pub const CREATE_CURVE_THRESHOLD: f64 = 5.;