Skip to content

Add bounded iPad pinch zoom viewport - #98

Closed
alantangok wants to merge 2 commits into
hugeBlack:mainfrom
alantangok:alan/feature/ipad-pinch-zoom
Closed

alantangok wants to merge 2 commits into
hugeBlack:mainfrom
alantangok:alan/feature/ipad-pinch-zoom

Conversation

@alantangok

@alantangok alantangok commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a dedicated persistent two-finger pinch zoom preference without reusing legacy session-state storage
  • keep the host cursor fixed while zooming around the pinch anchor
  • constrain the viewport to the rendered host area and follow the cursor near edges
  • account for docked software-keyboard occlusion while zoomed, including portrait, landscape, and letterboxed hosts
  • preserve the viewport in Direct mouse mode

Verification

  • unsigned Release iOS device build succeeded
  • Xcode Release static analysis succeeded
  • temporary viewport assertions cover portrait, landscape, letterboxed hosts, keyboard show/hide, and Direct-mode constraints
  • no project file, .checkpoint, or scripts/ changes

Device validation still required

  • docked keyboard at low/high zoom in portrait and landscape
  • 4:3 and widescreen hosts, including keyboard show/hide while already panned
  • Touchpad and Direct cursor modes; floating/split keyboard UX remains a manual check

Split from #93.

@SandiyosDev

Copy link
Copy Markdown
Collaborator

I'm not taking the zoom behavior change in this form... centering came from #78 and people asked for it (#71), so changing how the view follows the cursor needs a setting that defaults to what we have, not a rewrite

@SandiyosDev

Copy link
Copy Markdown
Collaborator

and there are two things I can see from the code alone, in direct mode the follow is skipped entirely and the scroll view's own panning is disabled so a zoomed view can't be moved, and the clamp is gated on the pinch toggle instead of the zoom scale so turning zoom off while zoomed leaves it unclamped. savedZoomEnabled is also still declared with nothing reading it, so anyone who had it on loses zoom on update

@SandiyosDev

Copy link
Copy Markdown
Collaborator

The keyboard height fix is good on its own, if you open that as its own PR I can take it now
if you want to keep going on edge follow, put it behind a setting with #78's behavior as the default and fix the direct mode case first

@SandiyosDev

Copy link
Copy Markdown
Collaborator

the keyboard height fix is in #107 with you as the author, rest conflicts with main now, so closing this one

@SandiyosDev SandiyosDev closed this Oct 7, 2026
@alantangok

Copy link
Copy Markdown
Contributor Author

Thanks @SandiyosDev for the detailed review and for extracting and merging the keyboard-height fix in #107. I understand the concerns with the broader zoom changes, especially preserving the existing default behavior and fixing the Direct-mode and settings cases. I appreciate you taking the useful part forward and explaining what still needs work.

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.

2 participants