pri.jzoom2

1.1.2 • Public • Published

jZoom2

Widget for pinching and zooming of any DOM element.
Author: Yuriy Petrov

Installation

jZoom2 needs Hammer.JS and jQuery. But you don't need to install it manually if you're using bower.

Via Bower

bower install pri.jzoom2 --save

Via NPM

npm install pri.jzoom2 --save

After download the widget place this in html.

<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/hammerjs/hammer.js"></script>

Replace bower_components to node_modules if you're using bower instead of npm.

Base arguments

jZoom2(element, options)

How to use

let zoomEl = new jZoom2('#el', {});

Options

options.maxScale

Maximum scale factor of manipulated element.

Default: 3

options.iscrollObj

Push iScroll object through if you are using it. Basically it needs for right detection visible element or not right now.

Default: null.

Events

Usage: zoomEl.on(event, callback)

  • beforeOpen, calls before open process starts
  • open, calls when method open done its work
  • beforeClose, calls before close process starts
  • close, calls when method close done its work

Readme

Keywords

none

Package Sidebar

Install

npm i pri.jzoom2

Weekly Downloads

0

Version

1.1.2

License

BSD-2-Clause

Last publish

Collaborators

  • redos8