Skip to content

Commit 6a8386d

Browse files
0SlowPoke0Keavon
andauthored
Improve Pen tool handle dragging with Tab swapping, Ctrl angle locking, and directly dragging the closing endpoint in handle (#2452)
* added handle_types and refactored the handle_adjustments * anchor move refactor * code-todo-fix * removed-draw-mode * kind of works need to figure out snapping * some refactoring * refactor+overlays..need to fix the snapping and dragging * added docs * got stuck in space move * fixed all issues * comments and small fixes * completed last issue and refactor * major fixes and improv * fixed edge cases * edge cases fixed * fix edge cases and add docs * Code review pass * rename ,bug fixes * Add terminology diagram * Add Ctrl "Lock Angle" hint * Rename other hint --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
1 parent 32aee1e commit 6a8386d

File tree

4 files changed

+601
-275
lines changed

4 files changed

+601
-275
lines changed

editor/src/messages/input_mapper/input_mappings.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ pub fn input_mappings() -> Mapping {
254254
//
255255
// PenToolMessage
256256
entry!(PointerMove; refresh_keys=[Control, Alt, Shift, KeyC], action_dispatch=PenToolMessage::PointerMove { snap_angle: Shift, break_handle: Alt, lock_angle: Control, colinear: KeyC, move_anchor_with_handles: Space }),
257+
entry!(KeyDownNoRepeat(Tab); action_dispatch=PenToolMessage::SwapHandles),
257258
entry!(KeyDown(MouseLeft); action_dispatch=PenToolMessage::DragStart { append_to_selected: Shift }),
258259
entry!(KeyUp(MouseLeft); action_dispatch=PenToolMessage::DragStop),
259260
entry!(KeyDown(MouseRight); action_dispatch=PenToolMessage::Abort),

editor/src/messages/tool/tool_messages/path_tool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ impl Fsm for PathToolFsmState {
14681468
let drag_anchor = HintInfo::keys([Key::Space], "Drag Anchor");
14691469
let toggle_group = match dragging_state.point_select_state {
14701470
PointSelectState::HandleNoPair | PointSelectState::HandleWithPair => {
1471-
let mut hints = vec![HintInfo::keys([Key::Tab], "Swap Selected Handles")];
1471+
let mut hints = vec![HintInfo::keys([Key::Tab], "Swap Dragged Handle")];
14721472
hints.push(HintInfo::keys(
14731473
[Key::KeyC],
14741474
if colinear == ManipulatorAngle::Colinear {

0 commit comments

Comments
 (0)