-
Mahmoud Aglan authored
ChessBoard sized itself from container.clientWidth, which INCLUDES padding, so inside a padded container the board came out exactly the padding too wide. On the puzzle screen that pushed the whole page 4px sideways and hung the board off the edge. Sizing now measures the container's content box. resize() had a second bug: it set canvas.width/height (the backing store) but never the CSS width/height, so after any resize the element laid out at its attribute width — devicePixelRatio times too large. It also now resets the transform before scaling rather than relying on the implicit reset. Both paths share one availableSize(), so they can no longer disagree. Local audit is clean across all scenes at 360/390/430px. Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com>
13cbc287