Skip to content
This repository has been archived by the owner on Apr 27, 2019. It is now read-only.

kylebarrow/pinchzoom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 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)
zoomStartEventName  Registers a custom handler to be triggered by the ZoomStart event (default pz_zoomstart)
zoomEndEventName    Registers a custom handler to be triggered by the ZoomEnd event (default pz_zoomend)
dragStartEventName  Registers a custom handler to be triggered by the DragStart event (default pz_dragstart)
dragEndEventName    Registers a custom handler to be triggered by the DragEnd event (default pz_dragend)
doubleTapEventName  Registers a custom handler to be triggered by the DoubleTap event (default pz_doubletap)

Methods


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

Licence

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 3 of the License, or (at your option) any later version.

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

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.5%
  • CSS 20.5%