Reported: pages appeared blank/"a silhouette" on first load and refresh, becoming visible only after hitting zoom. Root cause: loadDocument() computed fitZoom/zoom correctly after loading a PDF, but never actually called renderAllPages() - only zoomIn/zoomOut/resetZoom do (via applyZoom), which is why touching zoom "fixed" it. With nothing drawing into them, every <canvas> sat at the browser's own unset-canvas default (300x150px), a small blank shadowed rectangle. The render pipeline itself was never in question - already proven correct by zoom successfully triggering it - this was purely a sequencing bug. Fixed with nextTick() before renderAllPages(): setting numPages only queues the v-for's canvas elements, they don't exist in the DOM (so canvasRefs stays empty) until Vue flushes that update, which nextTick explicitly waits for. Also investigated the separately reported "no longer see the other top bar pdf options" - checked the zoom-controls row's own v-if and CSS, found no second bug there. Most likely the same blank-canvas symptom read as the whole panel looking broken; not confirmed as the same issue, flagged to the user to check once this fix is live rather than assumed resolved. Verified: npm run build passes, the app container rebuilt. measure.py unaffected. Not machine-verified - 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.