[eric] canvas: the camera writer publishes --canvas-zoom for chrome that must not shrink with the map

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xkMseod9vJ3hCrE43ctDo
(cherry picked from commit f492d6af5c1bac1ec9e2c3966cf0907a80a4af86)
This commit is contained in:
ciregenz
2026-09-06 20:22:01 -07:00
parent df324b8af8
commit d49f4bc1aa
@@ -125,7 +125,10 @@ export function useCanvasControls(
const applyLiveToDom = useCallback(() => { const applyLiveToDom = useCallback(() => {
const { panX, panY, zoom } = stateRef.current; const { panX, panY, zoom } = stateRef.current;
const content = contentRef.current; const content = contentRef.current;
if (content) content.style.transform = `translate(${panX}px, ${panY}px) scale(${zoom})`; if (content) {
content.style.transform = `translate(${panX}px, ${panY}px) scale(${zoom})`;
content.style.setProperty('--canvas-zoom', String(zoom));
}
const grid = gridRef.current; const grid = gridRef.current;
if (grid) { if (grid) {
const spacing = 24 * zoom; const spacing = 24 * zoom;