Selecting rotated elements, and page sizes while editing together.
Fixed in this release
A multiple selection fits rotated elements. Its frame, the area that drags it and the
rubber band now go by where an element is drawn. Before, a rotated element stuck partly out of
the frame, the grab area took in empty space, and the rubber band could miss an element whose
visible corner it covered (or catch an angled line where nothing was drawn).
A group fits rotated contents. A group's frame goes around its elements where they are
drawn, so a rotated element in it no longer sticks out of the frame, and there is no empty space
around it. Resizing such a group scales a rotated element along its own sides: an element turned
a quarter grows in the direction the group is stretched. When a resize ends (a handle, a multiple
selection's handle, or the width and height fields), the frame fits the contents again: an
element turned in between quarter turns cannot follow an uneven resize exactly, so the size the
frame ends at can differ a little from the one typed. A group that is rotated, sheared or flipped
itself keeps the frame it has, on opening, undo, duplicate and while editing together, so
nothing it draws moves.
A multiple selection follows someone else's change. When another participant changes an
element in your selection, the frame and its handles move with it and a drag moves the element
itself. Before, the selection kept pointing at the element as it was.
A page size reaches the others on facing pages. Changing the width or height in the
parameter bar or the page size dialog is one step for everyone in the room, so both pages of a
spread change for every participant. Undo takes it back as one step, as before.
Typograph developers notes
TYP-919, canvas #225: PageElement.visual_screen_rect(view) (canvas src/page.ts), the
screen counterpart of drawn_bounds_native(), is what Page.getScreenbounds() and the editor's
rubber band (src/movedragselectionhandler.ts) use. apply_remote_changes() rebuilds the
selection box by uuid (rebind_temp_selection()); create_temp_selection() takes an optional
list of elements.
PageElementGroup.calc_native_rect() builds the box of an untransformed group from the
children's drawn_bounds_native(); a transformed group keeps the box it has (it is never derived
again once it has one, and the loaders adopt the saved box), since its transform and the PDF
generator work about that box's centre. A group resize, from a handle or through update_native_rect(), scales a
child turned a quarter about its centre along its own sides (quarter_turn_scale(), canvas #225).
fit_group_box() (src/groupboxutils.ts) fits a group's box after a handle, a multiple-selection
handle and the parameter bar's width and height, before the step is recorded; not a transformed
group.
The page width/height in src/parameterbarpage.ts and src/pagesizedialog.ts use
set_undo_structure()/set_redo_structure() instead of set_undo()/set_redo(): an element
step does not carry the spread's page records (canvas docs/collaboration.md).
Canvas pin: 9cb2588 → 0790a1f (the merge of canvas #225): canvas #225, and #226/#227 (TYP-1276), which cancel each other
out in src/. canvas-service moves to the same commit.