Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
moppeeer
2026-10-29 15:08:12 +01:00
co-authored by Claude Opus 5.5
parent 89808ec42f
commit 785c49a1d4
+13 -13
View File
@@ -703,19 +703,19 @@ impl SelectionTool {
self.drag = Drag::Anchor { id, si, ai, handle, start: p, at };
return vec![Action::Begin(if handle.is_some() { "Move Direction Handle".into() } else { "Move Anchor".into() })];
}
// As in InDesign, the Direct Selection tool pressed on a corner or anchor of an object
// that isn't selected selects it and moves just that point (Chris Nielsen's "The
// InDesign Toolbox", 10:10: click outside, then pull a frame's corner).
if self.direct
&& !ev.mods.shift
&& let Some((_, hit)) = cx.hit(p)
&& !cx.selection.contains(hit)
&& let Some((id, si, ai, None)) = anchor_at_in(cx, &[hit], p)
{
let at = anchor_spread_point(cx, id, si, ai);
self.drag = Drag::Anchor { id, si, ai, handle: None, start: p, at };
return vec![Action::Exec("selection.set".into(), json!({"ids": [id], "content": true})), Action::Begin("Move Anchor".into())];
}
// As in InDesign, the Direct Selection tool pressed on a corner or anchor of an object
// that isn't selected selects it and moves just that point (Chris Nielsen's "The
// InDesign Toolbox", 10:10: click outside, then pull a frame's corner).
if self.direct
&& !ev.mods.shift
&& let Some((_, hit)) = cx.hit(p)
&& !cx.selection.contains(hit)
&& let Some((id, si, ai, None)) = anchor_at_in(cx, &[hit], p)
{
let at = anchor_spread_point(cx, id, si, ai);
self.drag = Drag::Anchor { id, si, ai, handle: None, start: p, at };
return vec![Action::Exec("selection.set".into(), json!({"ids": [id], "content": true})), Action::Begin("Move Anchor".into())];
}
// A selected placed graphic's own handles resize it inside its frame (the
// frame's anchors, under Direct Selection, come first).
if let Some((id, h)) = content_handle_at(cx, p)