Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Zooming and Panning in Lightbox #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

krkeegan
Copy link

  • Allow setting a minimum Zoom-Out scale. viewerMinZoom
  • Allow resetting the view to the initial view when ZoomMin has been reached. This re-centers the image. viewerResetZoomAtMin
  • Allow for RelativePinchtoZoom where successive pinching results in additional zooming rather than starting over each time. This functions much more like what people are used to on their phones. viewerRelativePinchZoom
  • Define ZoomMax as where 1 pixel in the image equals 1 pixel on the display. The current version sets zoom max at 3 times the initial image size. On small screens this can mean very little zooming. On large screens this may allow zooming beyond 1:1.
  • Allow defining a ZoomOut scaling factor for pinch to zoom. Zooming by default is slow because its scale is [0,1] where as zooming in is [1,inf]. A scaling factor of 3 seems to create the expected zoom out functionality. viewerZoomOutScale
  • Limit panning so that the edge of the image is not allowed to go past the center of the viewer. Current version allows the image to be infinitely panned, which can cause user confusion.

Allow setting a minumum Zoom-Out scale.

Allow resetting the view to the initial view when ZoomMin has
been reached.  This recenters the image.

Allow for RelativePinchtoZoom where successive pinching results
in additional zooming rather than starting over each time.

Define ZoomMax as where 1 pixel in the image equals 1 pixel on
the display.

Allow defining a ZoomOut scaling factor for pinch to zoom.
Zooming by default is slow because its scale is [0,1] where as
zooming in is [1,inf]. A scalling factor of 3 seems to create
the expected zoom out functionality.

Limit panning so that the edge of the image is not allowed to
go past the center of the viewer.
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.

1 participant