Skip to content

v0.171.0

Choose a tag to compare

@tenphi tenphi released this 27 Aug 11:30
· 108 commits to main since this release
ae2b2d1

Minor Changes

  • #1370 154a701f Thanks @tenphi! - <Board collisionMode="swap"> now places a widget arriving from another board instead of cancelling the transfer.

    swap used to treat a cross-board arrival as strict insertion: the anchor cell had to be empty, and releasing over an occupied one cancelled the whole transfer — both boards snapped back and onWidgetTransfer never fired. That made the mode's two halves unusable together, since a board that wanted in-board swapping had to give up cross-board drops (or pick downscale and give up the swap).

    A cross-board arrival now resolves the same way downscale does: it keeps its size where the drop cell allows, downscales into the room to its right and below where it does not, and holds the last cell it fitted in as the pointer sweeps across a destination widget — so releasing over an occupied cell commits what the preview was showing. Entering a board directly over an occupied cell places the widget in the nearest cell that fits. Destination widgets are still never exchanged, pushed, or reflowed to make space — only the arrival moves. In-board drops are unchanged and still swap.

    Also fixes a cross-board landing under any collisionMode where a refused placement committed the widget one row above the board (y: -1) instead of on it.

Patch Changes

  • #1370 154a701f Thanks @tenphi! - <Board collisionMode="downscale"> (and the cross-board half of "swap") now shrinks a widget into free room on either side of a blocker, not just the left.

    gridBounds clamps a drag anchor to cols - w, which assumes the widget keeps the width it started with. So when the blocker sat to the left and the room to its right was narrower than the widget, every anchor a pointer could produce landed inside the blocker — the mode whose whole job is to shrink the widget into that room never got offered it, and the drop just reverted. Dropping into room on the left always worked, because column 0 is reachable whatever the widget's width.

    A blocked drop whose anchor is pinned against the grid edge now also considers the cells beyond it that the clamp hid, taking the largest fit among them. An anchor short of the limit is the pointer's own choice — every cell between it and the limit was available to aim at — so a blocked drop there still reverts, and every drop that resolved before resolves to exactly the same cell. The row axis clamps the same way, so boards with a finite maxRows get the same fix below a blocker.