Skip to content

Commit

Permalink
added ctrl key required to zoom option
Browse files Browse the repository at this point in the history
  • Loading branch information
Dani committed Jan 4, 2018
1 parent 6754be1 commit 97b9b7e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions croppie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -618,7 +618,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
Expand Down
Loading

0 comments on commit 97b9b7e

Please sign in to comment.