Skip to content

Commit

Permalink
merge conflicts with master
Browse files Browse the repository at this point in the history
  • Loading branch information
thedustinsmith committed Feb 5, 2018
2 parents 1c848c3 + 97b9b7e commit 25593fc
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions croppie.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
* Croppie
* Copyright 2017
* Foliotek
* Version: 2.5.1
* Version: 2.5.2
*************************/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
@@ -631,7 +631,9 @@
function scroll(ev) {
var delta, targetZoom;

if (ev.wheelDelta) {
if(self.options.mouseWheelZoom === 'ctrl' && ev.ctrlKey != true){
return 0;
} else if (ev.wheelDelta) {
delta = ev.wheelDelta / 1200; //wheelDelta min: -120 max: 120 // max x 10 x 2
} else if (ev.deltaY) {
delta = ev.deltaY / 1060; //deltaY min: -53 max: 53 // max x 10 x 2
3 changes: 2 additions & 1 deletion demo/demo.js
Original file line number Diff line number Diff line change
@@ -145,7 +145,8 @@ var Demo = (function() {
boundary: { width: 300, height: 300 },
showZoomer: false,
enableResize: true,
enableOrientation: true
enableOrientation: true,
mouseWheelZoom: 'ctrl'
});
resize.bind({
url: 'demo/demo-2.jpg',
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -146,8 +146,8 @@ <h3>Options</h3>
<span class="default">Default</span><code class="language-javascript">true</code>
</li>
<li id="mouseWheelZoom">
<strong class="focus">mouseWheelZoom</strong><em>boolean</em>
<p>Enable or disable the ability to use the mouse wheel to zoom in and out on a croppie instance</p>
<strong class="focus">mouseWheelZoom</strong><em>object</em>
<p>Enable or disable the ability to use the mouse wheel to zoom in and out on a croppie instance. If <code class="language-javascript">'ctrl'</code> is passed mouse wheel will only work while control keyboard is pressed</p>
<span class="default">Default</span><code class="language-javascript">true</code>
</li>
<li id="showZoomer">
@@ -376,7 +376,8 @@ <h2>Demos</h2>
boundary: { width: 300, height: 300 },
showZoomer: false,
enableResize: true,
enableOrientation: true
enableOrientation: true,
mouseWheelZoom: 'ctrl'
});
resize.bind({
url: 'demo/demo-2.jpg',

0 comments on commit 25593fc

Please sign in to comment.