feat: remember zoom and pan position per board across sessions

Viewport transform (zoom level + pan offset) is saved to localStorage
keyed by board ID. Restored automatically when reopening the same board.
Debounced 300ms save on zoom/pan to avoid excessive writes.
This commit is contained in:
Hiren
2026-03-09 18:31:55 +05:30
parent cdeafce7ad
commit 00c3370634
2 changed files with 50 additions and 5 deletions
+1
View File
@@ -735,6 +735,7 @@ export default function Editor({ isPublicView }: EditorProps) {
ref={canvasRef}
canvasState={canvasState}
currentTool={activeTool}
boardId={resolvedBoardId}
onChange={onCanvasChange}
/>
<UserCursors