soroban-abacus-flashcards/apps/web
Thomas Hallock 2331f1038c fix: cap zoom when releasing pointer lock (escape key)
When user pressed Escape to exit precision mode, the zoom would stay
at the uncapped value (e.g., 50×) instead of animating back down to
the capped threshold (20 px/px). This was because:
- Zoom was set to uncapped value when precision mode activated
- When pointer lock released, no zoom recalculation occurred
- Zoom remained "stuck" at the uncapped value

Solution:
- When pointer lock is released, recalculate zoom with capping applied
- If uncapped zoom exceeds threshold, cap it at threshold
- This triggers animation to zoom back down to the threshold

Changes:
- Added zoom recalculation logic in handlePointerLockChange when !isLocked
- Calculate screen pixel ratio for uncapped zoom
- Cap zoom at threshold if it would exceed it
- Set targetZoom to capped value, triggering smooth zoom-out animation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:35:41 -06:00
..
.claude feat: add precision mode system with pixel grid visualization 2025-11-23 14:00:43 -06:00
.storybook fix: refactor worksheet config persistence to blacklist approach + Storybook stories 2025-11-13 11:26:36 -06:00
__tests__ fix(worksheets): ten-frames not rendering in mastery mode 2025-11-10 10:06:27 -06:00
content/blog
data fix: align share persistence with user session logic 2025-11-11 12:03:32 -06:00
docs
drizzle feat: add skill configuration system with interactive 2D difficulty plot 2025-11-11 15:04:28 -06:00
e2e feat: add precision mode system with pixel grid visualization 2025-11-23 14:00:43 -06:00
public
scripts worksheet studio 2025-11-11 11:44:40 -06:00
src fix: cap zoom when releasing pointer lock (escape key) 2025-11-23 21:35:41 -06:00
.dockerignore.test
.gitignore
CARD_SORTING_PORT_PLAN.md
COMPLEMENT_RACE_PORT_PLAN.md
DEVELOPMENT_STANDARDS.md
LINTING.md
README.md
biome.jsonc fix(worksheets): ten-frames not rendering in mastery mode 2025-11-10 10:06:27 -06:00
drizzle.config.ts fix(worksheets): ten-frames not rendering in mastery mode 2025-11-10 10:06:27 -06:00
eslint.config.js fix(worksheets): ten-frames not rendering in mastery mode 2025-11-10 10:06:27 -06:00
next-env.d.ts
next.config.js fix: configure Next.js to transpile @svg-maps ES modules 2025-11-20 09:15:53 -06:00
package.json Revert "feat: use big.js for arbitrary precision in cursor and zoom math" 2025-11-19 19:24:07 -06:00
panda.config.ts fix: refactor worksheet config persistence to blacklist approach + Storybook stories 2025-11-13 11:26:36 -06:00
playwright.config.ts fix(worksheets): ten-frames not rendering in mastery mode 2025-11-10 10:06:27 -06:00
pnpm-lock.yaml
server.js debug: add error handling for socket-server require to see actual failure 2025-11-20 05:51:24 -06:00
svg-processing-test.js fix(worksheets): ten-frames not rendering in mastery mode 2025-11-10 10:06:27 -06:00
test-arcade-api.sh
test-flashcards-final.pdf
test-flashcards.pdf
test-simplified.pdf
test_fullscreen_persistence.html
test_panda_simple.html
tsconfig.json worksheet studio 2025-11-11 11:44:40 -06:00
tsconfig.server.json fix: use dynamic ES module imports for @svg-maps packages in know-your-world 2025-11-22 12:16:54 -06:00
vitest.config.ts feat(know-your-world): full-screen layout with squish-through pointer lock escape 2025-11-22 21:50:13 -06:00

README.md

Test deployment - Mon Nov 3 16:31:57 CST 2025