Skip to content

feat: reusable visual PDF editor canvas (#6) - #13

Open
nonamexishere wants to merge 1 commit into
McanKul:mainfrom
nonamexishere:feat/editor-canvas-issue-6
Open

feat: reusable visual PDF editor canvas (#6)#13
nonamexishere wants to merge 1 commit into
McanKul:mainfrom
nonamexishere:feat/editor-canvas-issue-6

Conversation

@nonamexishere

Copy link
Copy Markdown

Summary

Implements #6: reusable visual PDF editor canvas for later offline edit tools.

  • Typed edit model + viewport ↔ PDF transforms (CropBox, page rotation)
  • Undo/redo with gesture coalescing for move/resize
  • Page surface (pdf.js) + SVG overlay: select / move / resize / delete draft rectangles
  • Zoom uses stable stage fit-width (no blank page on zoom)
  • Resize handles use PDF y-up anchors (correct opposite-corner behavior)
  • Dev sandbox: sidebar “Editor canvas” (crop icon) → #/dev/editor-canvas
  • Clear messaging when opened in browser-only Vite (needs npm run tauri:dev)
  • Unit tests for coords, reducer, and resize

Out of scope (by design): writing objects into a PDF → issue #7.

How to test

  1. npm install && npm run tauri:dev (desktop app — not browser-only)
  2. Sidebar → Editor canvas (crop icon near Settings)
  3. Add a PDF → draw/add rectangles → move, resize all corners, zoom, undo/redo
  4. npm test && npm run build

Checklist

  • Offline-only; no new network/telemetry dependencies
  • Source PDF bytes not stored in the edit model
  • npm test / npm run build pass
  • Original files never written by this change (no PDF export yet)

Add offline page editor surface with PDF-space coordinates, undo/redo,
select/move/resize draft rectangles, zoom-stable rendering, and a dev
sandbox. Does not write overlays into PDFs (issue McanKul#7).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant