Skip to content

A shape is moved by hand - #14

Closed
anderix wants to merge 1 commit into
a-cell-is-edited-in-placefrom
a-shape-is-moved-by-hand
Closed

anderix wants to merge 1 commit into
a-cell-is-edited-in-placefrom
a-shape-is-moved-by-hand

Conversation

@anderix

@anderix anderix commented Sep 21, 2026

Copy link
Copy Markdown
Member

The fourth slice of 0.4.0, on top of #13. In xodp, in edit mode, a click picks one of the slide's own shapes, a drag moves it, and a drag on a corner handle moves that corner with the opposite one fixed. Each frame of the drag writes the four svg: attributes through set_geometry in the unit they were read in, so the shape is drawn where it is; the tree is recorded once when the drag begins, so a drag is one undo step. Not picked: a shape placed by draw:transform, a line, a connector, a group, and the master page's decorations.

The hit is tested where the button went down. egui reports a drag only once the pointer has travelled past its threshold and gives the pointer's position then, ten points from an eight-point handle, which is how the first attempt at a resize deselected the shape instead of resizing it.

Checked: clippy with -D warnings, fmt, the catalogue check, the full test suite, and the window on X11: the title frame of the corpus deck picked with its four handles, dragged, saved with svg:x="4.8971cm" in the file, then its bottom-right handle dragged 100 by 40 points and saved as svg:width="18.2644cm" svg:height="4.3918cm" with x and y unchanged, and Ctrl+Z putting the frame back.

🤖 Generated with Claude Code

In xodp, in edit mode, a click picks one of the slide's own shapes, a
drag moves it, and a drag on a corner handle moves that corner with the
opposite one fixed. Each frame of the drag writes the four `svg:`
attributes through `set_geometry`, so the shape is drawn where it is
rather than previewed, and the tree is recorded once when the drag
begins, so a drag is one undo step. Escape and a click on the empty
page put the pick down; changing slide does too.

The hit is tested where the button went down. egui reports a drag only
once the pointer has travelled past its threshold and gives the
pointer's position then, ten points from an eight-point handle, which
is how the first attempt at a resize deselected the shape instead.

What is not picked: a shape placed by `draw:transform`, which states no
corner; a line, placed by its ends; a connector; a group; and
everything the master page contributes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@anderix
anderix deleted the branch a-cell-is-edited-in-place September 21, 2026 22:21
@anderix anderix closed this Sep 21, 2026
@anderix anderix mentioned this pull request Sep 21, 2026
@anderix

anderix commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

Closed by a branch deletion during a stacked merge, not by a decision: its commits reached main through #18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant