From 14596b5663f146fa3d65f24eae0840e95cf1fd8c Mon Sep 17 00:00:00 2001 From: leon Date: Thu, 21 Jul 2022 10:26:56 +0800 Subject: [PATCH] Roo/dialog/UploadCropbox.js --- Roo/dialog/UploadCropbox.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Roo/dialog/UploadCropbox.js b/Roo/dialog/UploadCropbox.js index 6df476ace3..e318eebede 100644 --- a/Roo/dialog/UploadCropbox.js +++ b/Roo/dialog/UploadCropbox.js @@ -891,14 +891,14 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, { var scale = this.outputMaxWidth / canvas.width; canvas.width = canvas.width * scale; canvas.height = canvas.height * scale; - // context.fillStyle = 'white'; - // context.fillRect(0, 0, canvas.width - 100, canvas.height); + context.fillStyle = 'white'; + context.fillRect(0, 0, canvas.width - 100, canvas.height); context.scale(scale, scale); } - // else { - context.fillStyle = 'white'; - context.fillRect(0, 0, this.thumbEl.getWidth() / this.getScaleLevel(), this.thumbEl.getHeight() / this.getScaleLevel()); - // } + + context.fillStyle = 'white'; + context.fillRect(0, 0, this.thumbEl.getWidth() / this.getScaleLevel(), this.thumbEl.getHeight() / this.getScaleLevel()); + context.drawImage(imageCanvas, sx, sy, width, height, x, y, width, height); -- 2.39.2