usePdfViewer.js/useImageZoom.js gain a parallel highlights/showHighlights/ clearHighlights (several labeled boxes at once) alongside the existing single highlight/showHighlight/clearHighlight the review screen already depends on - that call site needed zero changes. SourceDocumentPanel.vue exposes both and renders the plural boxes via a new v-for. New useRegionDraw.js composable adds the click-and-drag-to-define-a-region interaction the manual mapping screen (L.6) will use, wired in via a new regionDrawMode prop + region-drawn emit, a no-op everywhere today. Both viewers now also expose their own raw zoom ref (previously only a formatted display string was public) so the region tool can convert a drawn pixel rectangle back into PDF-point/image-pixel space. Verified: 21 assertions against the real composables (a fake window.addEventListener is the only browser API useRegionDraw touches, so no real DOM was needed) - drag math divides correctly by zoom, an up-left drag still normalizes to a positive box, a sub-threshold drag never fires, and the new multi-highlight state never disturbs the existing single-highlight state. npm run build passes; the app container rebuilt and confirmed serving the new bundle. measure.py unaffected (no backend touched). Not machine-verified: actual on-screen rendering and a real mouse drag, same standing limitation as every other frontend-only change 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.