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

Commit eb66260

Browse files
author
bcabanes
committed
fix(zoom): Add parseFloat to zoom step
Before applying the zoom, make sure zoomStep is a number. Closes #20
1 parent 8ce9046 commit eb66260

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/imageCropper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Cropper.prototype.setupImageSRC = function() {
283283
* Set dimensions.
284284
*/
285285
Cropper.prototype.setDimensions = function() {
286-
this.zoomInFactor = 1 + this.options.zoomStep;
286+
this.zoomInFactor = 1 + parseFloat(this.options.zoomStep);
287287
this.zoomOutFactor = 1 / this.zoomInFactor;
288288

289289
this.imageRatio = this.options.height / this.options.width;

0 commit comments

Comments
 (0)