Closed andriesvn01 closed 8 years ago
cropCanvas in ImageCropper.ts is not cleared before drawing the Cropped image in the getCroppedImage function. It currently redraws new cropped image onto previous Cropped images.
Quick fix that worked for me:
let tempcanvasContext = this.cropCanvas.getContext("2d"); tempcanvasContext.clearRect(0, 0, this.cropCanvas.width, this.cropCanvas.height) this.drawImageIOSFix(tempcanvasContext, this.srcImage, Math.max(Math.round((bounds.left) / this.ratioW - offsetW), 0), Math.max(Math.round(bounds.top / this.ratioH - offsetH), 0), Math.max(Math.round(bounds.width / this.ratioW), 1), Math.max(Math.round(bounds.height / this.ratioH), 1), 0, 0, this.cropCanvas.width, this.cropCanvas.height);
+1
cropCanvas in ImageCropper.ts is not cleared before drawing the Cropped image in the getCroppedImage function. It currently redraws new cropped image onto previous Cropped images.
Quick fix that worked for me: