|
1 | 1 | use super::tool_prelude::*; |
2 | | -use crate::consts::{COLOR_OVERLAY_YELLOW, DRAG_THRESHOLD, HANDLE_ROTATE_SNAP_ANGLE, INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE, SELECTION_THRESHOLD, SELECTION_TOLERANCE}; |
| 2 | +use crate::consts::{COLOR_OVERLAY_BLUE, DRAG_THRESHOLD, HANDLE_ROTATE_SNAP_ANGLE, INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE, SELECTION_THRESHOLD, SELECTION_TOLERANCE}; |
3 | 3 | use crate::messages::portfolio::document::overlays::utility_functions::path_overlays; |
4 | 4 | use crate::messages::portfolio::document::overlays::utility_types::OverlayContext; |
5 | 5 | use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier; |
@@ -520,6 +520,7 @@ impl PathToolData { |
520 | 520 | handle_angle |
521 | 521 | } |
522 | 522 |
|
| 523 | + #[allow(clippy::too_many_arguments)] |
523 | 524 | fn apply_snapping( |
524 | 525 | &mut self, |
525 | 526 | handle_direction: DVec2, |
@@ -549,6 +550,7 @@ impl PathToolData { |
549 | 550 | document.metadata().document_to_viewport.transform_vector2(snap_result.snapped_point_document - handle_position) |
550 | 551 | } |
551 | 552 |
|
| 553 | + #[allow(clippy::too_many_arguments)] |
552 | 554 | fn drag( |
553 | 555 | &mut self, |
554 | 556 | equidistant: bool, |
@@ -622,7 +624,13 @@ impl Fsm for PathToolFsmState { |
622 | 624 | let state = tool_data.update_insertion(shape_editor, document, responses, input); |
623 | 625 |
|
624 | 626 | if let Some(closest_segment) = &tool_data.segment { |
625 | | - overlay_context.manipulator_anchor(closest_segment.closest_point_to_viewport(), false, Some(COLOR_OVERLAY_YELLOW)); |
| 627 | + overlay_context.manipulator_anchor(closest_segment.closest_point_to_viewport(), false, Some(COLOR_OVERLAY_BLUE)); |
| 628 | + if let (Some(handle1), Some(handle2)) = closest_segment.handle_positions(document.metadata()) { |
| 629 | + overlay_context.line(closest_segment.closest_point_to_viewport(), handle1, Some(COLOR_OVERLAY_BLUE)); |
| 630 | + overlay_context.line(closest_segment.closest_point_to_viewport(), handle2, Some(COLOR_OVERLAY_BLUE)); |
| 631 | + overlay_context.manipulator_handle(handle1, false, Some(COLOR_OVERLAY_BLUE)); |
| 632 | + overlay_context.manipulator_handle(handle2, false, Some(COLOR_OVERLAY_BLUE)); |
| 633 | + } |
626 | 634 | } |
627 | 635 |
|
628 | 636 | responses.add(PathToolMessage::SelectedPointUpdated); |
|
0 commit comments