From a9e3db54c55e01977e895222c686c4e2ac4bf4ed Mon Sep 17 00:00:00 2001 From: Wayne Mogg Date: Sat, 31 Dec 2016 11:05:00 +1000 Subject: [PATCH] Add zoomMax option --- README.md | 11 ++++++++++ demo.html | 3 ++- dist/imgViewer.js | 36 +++++++++++++++++++-------------- dist/imgViewer.min.js | 4 ++-- imgViewer.jquery.json | 2 +- package.json | 2 +- src/imgViewer.js | 42 ++++++++++----------------------------- test/imgViewer_options.js | 19 ++++++++++++++++-- 8 files changed, 66 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 145e991..aa4b4d4 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,14 @@ $("#image1").imgViewer("option", "zoomStep", 0.05); ```javascript $("#image1").imgViewer("option", "zoom", 3); ``` +###zoomMax + * Get/Set the limit on the maximum zoom level of the image - values less than 1 have no affect + * Default: 0 (ie no limit on zoom) + * Example - to restrict zoom to 3x or less: + +```javascript +$("#image1").imgViewer("option", "zoomMax", 3); +``` ###zoomable * Controls if image will be zoomable * Default: true @@ -189,6 +197,9 @@ This plugin is provided under the [MIT License](http://opensource.org/licenses/M Copyright (c) 2013 Wayne Mogg. ## Release History +### 0.9.1 +- Add zoomMax option to limit maximum possible zoom level + ### 0.9.0 - Replace jquery.event.ue with hammer.js and jquery.hammer.js for more flexibility with touch gesture support - Add dragable option allowing user to disable dragging diff --git a/demo.html b/demo.html index ebc4eb0..c0b9975 100644 --- a/demo.html +++ b/demo.html @@ -33,9 +33,10 @@

Centred in a div - Dynamic Width