Gallery handles
Hover a gallery row and a few handles appear. Every drag only rewrites
ag:cropandag:group— never pixel coordinates, and neverag:rows.
Five kinds of handle
| Handle | Where | What it does | What it writes |
|---|---|---|---|
| Divider | between two cells | neighbouring cells trade width, row height unchanged | both cells' ag:crop |
| Row bar | under the row, in the caption gap | the whole row gets taller or shorter, column ratios unchanged | each cell's ag:crop |
| Swap | either side of a cell | swap places with the neighbour | swaps the two source lines |
| Merge into neighbour | row start / row end | move this image into the row above or below | rewrites ag:group, clears a stale ag:rows |
| Link button | bottom-right of a cell | lock the row so packing leaves it alone | same ag:group id on every cell |
One drag is one commit, one undo step; pressing Esc mid-drag cancels it and restores the previous geometry.
Dragging a divider changes the two adjacent widths while the row height stays fixed.
Parameters only, never file structure
After dragging a divider the source gains something like:
No pixel widths, no inline styles. Change the theme, the font size or the window width and the same ratios are recomputed — that is the point of writing ratios instead of sizes.
A drag does not pin the row split either: ag:rows only comes from hand-editing, so an unbound group re-splits when its ratios change. Bind with the link button to keep members together; releasing the binding returns the group to automatic routing.
Controls degrade gracefully
As a cell narrows the control area steps down: two trays → collapsed tray → vertical stack → hidden. It never overlaps and never covers the image itself.
Where there are no handles
| Situation | Why |
|---|---|
| Reading view | handles only exist in Live Preview |
| Images inside list items | bullets make the row boundary ambiguous |
| Table cells | the table decides the width; only the action buttons remain |
| Single (non-gallery) images | use the corner grip instead, see Resize and align |
Locking a row



Consecutive images sharing an id lock into one row; if two adjacent rows use the same id they get merged into one, so use different positive integers. Once locked, packing will neither pull other images in nor split the row apart.
The link button is a toggle: clicking it again releases the binding, clears ag:group and returns the group to automatic routing — it does not quietly write an ag:rows that freezes the current split.
Next
- Row splitting and mixed ratios
- Annotation syntax: these are the parameters every handle writes
- Resize, align, reset: gestures for single images