From 77b488e71c362f112a3841e67b9c28cd18385e49 Mon Sep 17 00:00:00 2001 From: leon Date: Tue, 12 Jul 2022 10:50:18 +0800 Subject: [PATCH] Roo/dialog/UploadCropbox.js --- Roo/dialog/UploadCropbox.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Roo/dialog/UploadCropbox.js b/Roo/dialog/UploadCropbox.js index 27a7d91217..fcb98e9951 100644 --- a/Roo/dialog/UploadCropbox.js +++ b/Roo/dialog/UploadCropbox.js @@ -899,31 +899,31 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, { console.log("X: " + x); console.log("Y: " + y); - var targetWidth = this.minWidth - 2 * x; - var targetHeight = this.minHeight - 2 * y; + // var targetWidth = this.minWidth - 2 * x; + // var targetHeight = this.minHeight - 2 * y; - console.log("targetWidth: " + targetWidth); - console.log("targetHeight: " + targetHeight); + // console.log("targetWidth: " + targetWidth); + // console.log("targetHeight: " + targetHeight); - var scale = 1; + // var scale = 1; - if((x == 0 && y == 0) || (x == 0 && y > 0)){ - scale = targetWidth / width; - } + // if((x == 0 && y == 0) || (x == 0 && y > 0)){ + // scale = targetWidth / width; + // } - if(x > 0 && y == 0){ - scale = targetHeight / height; - } + // if(x > 0 && y == 0){ + // scale = targetHeight / height; + // } - if(x > 0 && y > 0){ - scale = targetWidth / width; + // if(x > 0 && y > 0){ + // scale = targetWidth / width; - if(width < height){ - scale = targetHeight / height; - } - } + // if(width < height){ + // scale = targetHeight / height; + // } + // } - console.log("scale: " + scale); + // console.log("scale: " + scale); context.scale(scale, scale); -- 2.39.2