← all posts site ↗

dragging a row of cells together

the dashboard editor only moved one cell at a time and the live preview re rendered on every drag, so rearranging a board was slow and fiddly. now shift clicking a cell adds it to a selection, dragging on empty canvas rubber band selects a group, and ctrl a takes everything. the blue box covers the whole selection.

drag any selected cell and the whole group moves, snapped to the grid and clamped so nothing leaves the canvas. group handles resize every cell inside the box, arrows nudge the group, delete removes it, duplicate copies it. appearance edits apply to all selected cells at once, which is what makes the board actually editable instead of a pile of individual boxes.

group scaling broke the grid at first. each cell was scaled and rounded on its own, so two cells sharing an edge got two different rounded edges and the board filled with overlaps and gaps. the fix maps the group's unique edges through the scale once, snaps each edge to the grid, forces the sorted edges to stay in order at least one step apart, then rebuilds every cell from its mapped edges. cells that touched before still touch. tested on the whole board, on three scales in a row, and on a bottom row corner handle: zero overlaps, zero off grid cells, zero gaps.