Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

laonon/pinchzoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

33 Commits

Repository files navigation

PinchZoom.js

PinchZoom.js is a Javascript library providing multi touch gestures for zooming and dragging on any DOM element.

Usage

Requirements

Initialisation

new PinchZoom($('#your-element'), options);

Options


tapZoomFactor: The zoom factor a double tap zooms to. (default 2)
zoomOutFactor: Resizes to original size when zoom factor is below the configured value. (default 1.3)
animationDuration: The animation duration in milliseconds. (default 300)
maxZoom: The maximum zoom factor. (default 4)
minZoom: The minimum zoom factor. (default 0.5)
lockDragAxis Locks panning of the element to a single axis. (default false)

Events

Pinchzoom emits some custom events you can listen to


pz_zoomstart Started to zoom
pz_zoomend Stopped zooming
pz_dragstart Started to drag the element
pz_dragend Stopped to drag the element
pz_doubletap Resetting the zoom with doubletab

Methods


enable: Enables all gesture capturing (default)
disable: Disables all gesture capturing

Licence

PinchZoom is licensed under the MIT License.

Github Page with demo

http://rtp-ch.github.com/pinchzoom/

About

RTP.PinchZoom.js – A Javascript library providing multi touch gestures for zooming and dragging on any DOM element.

Resources

Stars

Watchers

Forks

Packages

Contributors

Languages

  • JavaScript 71.8%
  • CSS 18.1%
  • HTML 10.0%
  • Makefile 0.1%

AltStyle によって変換されたページ (->オリジナル) /