Paths: describe the anchor added on a selected segment as an end of its halves

A selected segment that path.insertAnchor splits stays selected as its
two halves. The new anchor is the end both halves share, so it moves
with them, and Delete cuts both halves. docs/mcp.md and the comment on
renumber_after_insert called it a direct-selected anchor; they now
describe it as an end of the halves that moves with them.
This commit is contained in:
dotCooCoo
2026-11-10 23:00:40 -08:00
parent f4496d61aa
commit 9bfd6b7be5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1534,7 +1534,7 @@ fn stretch_weights(anchors: &[Anchor], closed: bool, roles: &[Stretch]) -> Vec<[
/// After an anchor is added at `(si, added)` of path `id`, number the direct-selected anchors and
/// selected segments after it on that subpath one higher, so the selection keeps the same points.
/// A selected segment that the new anchor splits stays selected as its two halves, and the new
/// anchor is added to the direct-selected anchors.
/// anchor joins its ends in the anchors that move with it.
fn renumber_after_insert(sel: &mut Selection, id: NodeId, si: usize, added: usize) {
if let Some(set) = sel.anchors.get_mut(&id) {
// A selected anchor index can name no anchor (`select.anchors` takes any index), so the
+2 -2
View File
@@ -3677,8 +3677,8 @@ is not a whole number of 0 or more, such as 1.5, -1 or "1" ("missing integer `su
an `anchor` or `segment` in the same way. The document does not change and no undo step is recorded.
`path.insertAnchor` keeps the direct-selected anchors and selected segments of the path on the same points: those
after the new anchor on its subpath are numbered one higher, and a selected segment that the new anchor splits stays
selected as its two halves, and the new anchor is direct-selected with them. Undo restores the path and the selection
in one step.
selected as its two halves, with the new anchor as an end of both that moves with them. Undo restores the path and
the selection in one step.
`path.reshape {id, x, y, dx, dy, tol?, focal?, radius?}` (a Reshape tool drag) grabs the path at `x`, `y`, adding an
anchor there unless one lies within `tol` (3 by default), and moves that point by `dx`, `dy`.