|
1 | 1 | use super::select_tool::extend_lasso;
|
2 | 2 | use super::tool_prelude::*;
|
3 | 3 | use crate::consts::{
|
4 |
| - COLOR_OVERLAY_BLUE, COLOR_OVERLAY_GREEN, COLOR_OVERLAY_RED, DRAG_DIRECTION_MODE_DETERMINATION_THRESHOLD, DRAG_THRESHOLD, HANDLE_ROTATE_SNAP_ANGLE, INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE, |
5 |
| - SEGMENT_INSERTION_TOLERANCE, SEGMENT_OVERLAY_SIZE, SELECTION_THRESHOLD, SELECTION_TOLERANCE, |
| 4 | + COLOR_OVERLAY_BLUE, COLOR_OVERLAY_GREEN, COLOR_OVERLAY_RED, DRAG_DIRECTION_MODE_DETERMINATION_THRESHOLD, DRAG_THRESHOLD, HANDLE_ROTATE_SNAP_ANGLE, SEGMENT_INSERTION_DISTANCE, |
| 5 | + SEGMENT_OVERLAY_SIZE, SELECTION_THRESHOLD, SELECTION_TOLERANCE, |
6 | 6 | };
|
7 | 7 | use crate::messages::portfolio::document::overlays::utility_functions::{path_overlays, selected_segments};
|
8 | 8 | use crate::messages::portfolio::document::overlays::utility_types::{DrawHandles, OverlayContext};
|
@@ -1249,24 +1249,24 @@ impl Fsm for PathToolFsmState {
|
1249 | 1249 | (PathToolFsmState::Ready, PathToolMessage::PointerMove { delete_segment, .. }) => {
|
1250 | 1250 | tool_data.delete_segment_pressed = input.keyboard.get(delete_segment as usize);
|
1251 | 1251 |
|
1252 |
| - // If there is a point nearby then remove the overlay |
| 1252 | + // If there is a point nearby, then remove the overlay |
1253 | 1253 | if shape_editor
|
1254 | 1254 | .find_nearest_point_indices(&document.network_interface, input.mouse.position, SELECTION_THRESHOLD)
|
1255 | 1255 | .is_some()
|
1256 | 1256 | {
|
1257 | 1257 | tool_data.segment = None;
|
1258 | 1258 | responses.add(OverlaysMessage::Draw)
|
1259 | 1259 | }
|
1260 |
| - // If already hovering on a segment, then recalculate it's closest point |
| 1260 | + // If already hovering on a segment, then recalculate its closest point |
1261 | 1261 | else if let Some(closest_segment) = &mut tool_data.segment {
|
1262 | 1262 | closest_segment.update_closest_point(document.metadata(), input.mouse.position);
|
1263 |
| - if closest_segment.too_far(input.mouse.position, INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE, document.metadata()) { |
| 1263 | + if closest_segment.too_far(input.mouse.position, SEGMENT_INSERTION_DISTANCE, document.metadata()) { |
1264 | 1264 | tool_data.segment = None;
|
1265 | 1265 | }
|
1266 | 1266 | responses.add(OverlaysMessage::Draw)
|
1267 | 1267 | }
|
1268 |
| - // If not check that if there is some closest segment or not |
1269 |
| - else if let Some(closest_segment) = shape_editor.upper_closest_segment(&document.network_interface, input.mouse.position, SEGMENT_INSERTION_TOLERANCE) { |
| 1268 | + // If not, check that if there is some closest segment or not |
| 1269 | + else if let Some(closest_segment) = shape_editor.upper_closest_segment(&document.network_interface, input.mouse.position, SEGMENT_INSERTION_DISTANCE) { |
1270 | 1270 | tool_data.segment = Some(closest_segment);
|
1271 | 1271 | responses.add(OverlaysMessage::Draw)
|
1272 | 1272 | }
|
|
0 commit comments