Place pages edge to edge with no gap

Neighbouring pages now touch, so the tree reads like a grid. Rows with
pages of different sizes are still centred, so it isn't a strict grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL
This commit is contained in:
agent 2026-09-27 09:58:43 +00:00
parent 24ebbd9056
commit 308d6fc846

View file

@ -15,7 +15,8 @@ export interface Rect {
height: number; height: number;
} }
export const GAP = 40; // Pages touch edge to edge; rows of mixed sizes stay centred, so it reads like a loose grid.
export const GAP = 0;
export function layout(tree: Tree, sizeOf: (id: string) => Size): Map<string, Rect> { export function layout(tree: Tree, sizeOf: (id: string) => Size): Map<string, Rect> {
const rects = new Map<string, Rect>(); const rects = new Map<string, Rect>();