Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
fix(zoom): Add parseFloat to zoom step
Browse files Browse the repository at this point in the history
Before applying the zoom, make sure zoomStep is a number.

Closes #20
  • Loading branch information
bcabanes committed Feb 24, 2016
1 parent 8ce9046 commit eb66260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imageCropper.js
Expand Up @@ -283,7 +283,7 @@ Cropper.prototype.setupImageSRC = function() {
* Set dimensions.
*/
Cropper.prototype.setDimensions = function() {
this.zoomInFactor = 1 + this.options.zoomStep;
this.zoomInFactor = 1 + parseFloat(this.options.zoomStep);
this.zoomOutFactor = 1 / this.zoomInFactor;

this.imageRatio = this.options.height / this.options.width;
Expand Down

0 comments on commit eb66260

Please sign in to comment.