Skip to content

bug: improve zoom focal behavior at page and canvas edges #5

Description

@markm39

Problem

Pinch zoom near the top or side edges can pull the viewport inward instead of keeping the intended focal point under the fingers. This makes it hard to zoom precisely into content at the page/canvas edges.

Expected behavior

Zoom should preserve the user's focal intent as much as possible, including near page edges. Clamping should prevent empty space without making the content feel like it is drifting away from the gesture target.

Notes

Areas to inspect:

  • Focal-point zoom math in the zoomable viewport.
  • Edge clamping after scale changes.
  • Differences between top, side, and bottom edge behavior.
  • Behavior at minimum and maximum zoom.

Acceptance criteria

  • Pinching near top/left/right page edges zooms into the intended area.
  • The viewport still never exposes invalid empty canvas outside the page bounds.
  • Momentum scroll and normal panning behavior remain unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions