mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 09:38:12 +08:00
Path tool: sliding point insertion (#1581)
* #1578 sliding point works(1st approx) TODO: * don't move too close to the side points * double click works incorrect? * do we need to jump from segment to segment? * #1578 disallow move slide point too close to side points * fix double click + ctrl insertion * #1578 select insertion point (except `ctrl` case) * #1578 far depends on line width & more accurate seg finding * #1578 insert point on most top suitable selected layer * #1581 draw insertion point by overlay + `Esc` abort * #1581 sharp stay unchanged on double click * #1581 fix incorrect handle of scaling * #1581 `square` selection point & too close in px(instead of magic) * #1581 bug fix: insertion point on unselection * #1581 use `color: Option` instead of `SelectionType` * Some code review, still need to review shape_editor.rs * #1581 insert sharp point on a straight segment Also correct insertion on quadratic segments `ManipulatorGroup::have_handle` have such form because `handle = Some(self.anchor)` often used instead of `handle = None` * Final code review pass * Code review pass --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
a412a77062
commit
f25038067e
@@ -181,7 +181,12 @@ pub fn default_mapping() -> Mapping {
|
||||
entry!(KeyDown(Backspace); modifiers=[Accel], action_dispatch=PathToolMessage::DeleteAndBreakPath),
|
||||
entry!(KeyDown(Delete); modifiers=[Accel, Shift], action_dispatch=PathToolMessage::BreakPath),
|
||||
entry!(KeyDown(Backspace); modifiers=[Accel, Shift], action_dispatch=PathToolMessage::BreakPath),
|
||||
entry!(KeyDown(Lmb); action_dispatch=PathToolMessage::DragStart { add_to_selection: Shift }),
|
||||
entry!(KeyDown(Lmb); action_dispatch=PathToolMessage::MouseDown { ctrl: Control, shift: Shift }),
|
||||
entry!(KeyDown(Rmb); action_dispatch=PathToolMessage::RightClick),
|
||||
entry!(KeyDown(Escape); action_dispatch=PathToolMessage::Escape),
|
||||
entry!(KeyDown(KeyG); action_dispatch=PathToolMessage::GRS { key: KeyG }),
|
||||
entry!(KeyDown(KeyR); action_dispatch=PathToolMessage::GRS { key: KeyR }),
|
||||
entry!(KeyDown(KeyS); action_dispatch=PathToolMessage::GRS { key: KeyS }),
|
||||
entry!(PointerMove; refresh_keys=[Alt, Shift], action_dispatch=PathToolMessage::PointerMove { alt: Alt, shift: Shift }),
|
||||
entry!(KeyDown(Delete); action_dispatch=PathToolMessage::Delete),
|
||||
entry!(KeyDown(KeyA); modifiers=[Control], action_dispatch=PathToolMessage::SelectAllPoints),
|
||||
@@ -190,7 +195,7 @@ pub fn default_mapping() -> Mapping {
|
||||
entry!(KeyDown(Enter); action_dispatch=PathToolMessage::Enter {
|
||||
add_to_selection: Shift
|
||||
}),
|
||||
entry!(DoubleClick(MouseButton::Left); action_dispatch=PathToolMessage::InsertPoint),
|
||||
entry!(DoubleClick(MouseButton::Left); action_dispatch=PathToolMessage::FlipSharp),
|
||||
entry!(KeyDown(ArrowRight); action_dispatch=PathToolMessage::NudgeSelectedPoints { delta_x: NUDGE_AMOUNT, delta_y: 0. }),
|
||||
entry!(KeyDown(ArrowRight); modifiers=[Shift], action_dispatch=PathToolMessage::NudgeSelectedPoints { delta_x: BIG_NUDGE_AMOUNT, delta_y: 0. }),
|
||||
entry!(KeyDown(ArrowRight); modifiers=[ArrowUp], action_dispatch=PathToolMessage::NudgeSelectedPoints { delta_x: NUDGE_AMOUNT, delta_y: -NUDGE_AMOUNT }),
|
||||
|
||||
Reference in New Issue
Block a user