R.1 (frontend half) of the staged review-screen plan. An <iframe> has no overlay hook, so drawing a highlight box on a flagged row's own printed position (source_page/source_bbox, shipped in the previous commit) needed real rendering control. New usePdfViewer.js (installs pdfjs-dist) renders each page to its own canvas, stacked in one scrollable column - the closest behavioral match to the iframe's own scrollable multi-page view. The browser's native PDF toolbar goes away as a direct consequence; zoom is rebuilt to match useImageZoom.js's own -/+/Fit pattern. The coordinate mapping (bbox value * zoom, no axis flip) is the exact one already verified correct against real rendered fixtures in the backend half of this work, reused here rather than re-derived. useImageZoom.js gained the same highlight/highlightStyle/showHighlight/ clearHighlight shape for an image upload, reusing its own existing zoom math. SourceDocumentPanel.vue exposes one unified showHighlight(page, bbox)/clearHighlight() routing to whichever viewer is active - not called from anywhere yet, since R.2 (the flagged-row UI that would trigger it) isn't built. R.1 only builds the capability. Verified: npm run build passes, the pdf.js worker bundles and serves correctly (curl'd directly, 200). The app container rebuilt and the served bundle confirmed to contain the new class/function names. measure.py unaffected (no backend touched this half). Not machine-verified, more consequential than usual to leave that way: canvas rendering, worker loading, zoom, and scroll all depend on real browser behavior a bundle check can't confirm - Claude-in-Chrome did not connect this session. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| README.md | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| vite.config.js | ||
README.md
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.