Skip to content

Commit

Permalink
Fixed bug in reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit110 committed Jul 3, 2011
1 parent b63dbdf commit fc3968a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/CropperUI.js
Expand Up @@ -560,13 +560,16 @@ var fluid_1_4 = fluid_1_4 || {};
var croppingDimensions = {};
var croppedImageDataURL;

if (boxes.length > 0 && !isNotForCrop) {
if (boxes.length > 0) {
croppingDimensions.x = boxes[0].x - imageX;
croppingDimensions.y = boxes[0].y - imageY;
croppingDimensions.w = boxes[0].w;
croppingDimensions.h = boxes[0].h;
croppedImageDataURL = cropImage(image, croppingDimensions.x, croppingDimensions.y, croppingDimensions.w, croppingDimensions.h);
}
if (!isNotForCrop) {
croppedImageDataURL = cropImage(image, croppingDimensions.x, croppingDimensions.y, croppingDimensions.w, croppingDimensions.h);
}
}

boxes = [];
if (canvas) {
canvas.style.cursor = 'auto';
Expand Down

0 comments on commit fc3968a

Please sign in to comment.