Add lock angle modifier to the Pen tool (#1049)

* adds lock angle to pen tool

 The current [Shift] Break Handle behavior should become Alt instead of Shift
 The current [Ctrl] Snap 15° behavior should become Shift instead of Ctrl
 Implement the extend-in-this-direction feature called [Ctrl] Lock Angle that exists in the Line tool, but doesn't yet exist in the Pen tool

* avoid clone by passing exlusive ref to tool data field directly

* Rearrange hints

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Adam Jahn
2023-02-22 02:27:49 -05:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent 92cb553961
commit 069a2351f2
2 changed files with 31 additions and 18 deletions
@@ -171,7 +171,7 @@ pub fn default_mapping() -> Mapping {
entry!(DoubleClick; action_dispatch=PathToolMessage::InsertPoint),
//
// PenToolMessage
entry!(PointerMove; refresh_keys=[Shift, Control], action_dispatch=PenToolMessage::PointerMove { snap_angle: Control, break_handle: Shift }),
entry!(PointerMove; refresh_keys=[Shift, Control], action_dispatch=PenToolMessage::PointerMove { snap_angle: Shift, break_handle: Alt, lock_angle: Control}),
entry!(KeyDown(Lmb); action_dispatch=PenToolMessage::DragStart),
entry!(KeyUp(Lmb); action_dispatch=PenToolMessage::DragStop),
entry!(KeyDown(Rmb); action_dispatch=PenToolMessage::Confirm),