From 545523de540fb0891ba03989ad928c4c63260158 Mon Sep 17 00:00:00 2001 From: 0SlowPoke0 Date: Thu, 28 Nov 2024 09:33:51 +0530 Subject: [PATCH 1/2] disable collinear state --- .../src/messages/tool/common_functionality/shape_editor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/src/messages/tool/common_functionality/shape_editor.rs b/editor/src/messages/tool/common_functionality/shape_editor.rs index 446c48e3e8..f77fe3474f 100644 --- a/editor/src/messages/tool/common_functionality/shape_editor.rs +++ b/editor/src/messages/tool/common_functionality/shape_editor.rs @@ -662,7 +662,12 @@ impl ShapeState { let Some(other) = vector_data.other_colinear_handle(handle) else { continue }; if state.is_selected(other.to_manipulator_point()) { - continue; + if let Some(handles) = point.get_handle_pair(&vector_data) { + let modification_type = VectorModificationType::SetG1Continuous { handles, enabled: false }; + responses.add(GraphOperationMessage::Vector { layer, modification_type }); + } else { + continue; + } } let new_relative = if equidistant { From f123a4e87a29c755e9fe7538b16ba25ab8409453 Mon Sep 17 00:00:00 2001 From: hypercube <0hypercube@gmail.com> Date: Fri, 29 Nov 2024 22:57:15 +0000 Subject: [PATCH 2/2] Add comment --- .../tool/common_functionality/shape_editor.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/editor/src/messages/tool/common_functionality/shape_editor.rs b/editor/src/messages/tool/common_functionality/shape_editor.rs index f77fe3474f..03c3ef02e7 100644 --- a/editor/src/messages/tool/common_functionality/shape_editor.rs +++ b/editor/src/messages/tool/common_functionality/shape_editor.rs @@ -662,12 +662,11 @@ impl ShapeState { let Some(other) = vector_data.other_colinear_handle(handle) else { continue }; if state.is_selected(other.to_manipulator_point()) { - if let Some(handles) = point.get_handle_pair(&vector_data) { - let modification_type = VectorModificationType::SetG1Continuous { handles, enabled: false }; - responses.add(GraphOperationMessage::Vector { layer, modification_type }); - } else { - continue; - } + // If two colinear handles are being dragged at the same time but not the anchor, it is necessary to break the colinear state. + let handles = [handle, other]; + let modification_type = VectorModificationType::SetG1Continuous { handles, enabled: false }; + responses.add(GraphOperationMessage::Vector { layer, modification_type }); + continue; } let new_relative = if equidistant {