Coder Social home page Coder Social logo

suautumn / pinchzoom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from manuelstofer/pinchzoom

0.0 2.0 0.0 1.88 MB

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

Home Page: http://manuelstofer.github.com/pinchzoom/

Makefile 0.11% HTML 9.99% CSS 18.13% JavaScript 71.78%

pinchzoom's Introduction

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/

pinchzoom's People

Contributors

heisch avatar jcpmmx avatar lrueegg avatar manuelstofer avatar neekey avatar simontuck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.