Roo/dialog/UploadCropbox.js
authorleon <leon@roojs.com>
Tue, 12 Jul 2022 03:33:20 +0000 (11:33 +0800)
committerleon <leon@roojs.com>
Tue, 12 Jul 2022 03:33:20 +0000 (11:33 +0800)
Roo/dialog/UploadCropbox.js

index de2e010..457f1c0 100644 (file)
@@ -879,20 +879,20 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
             scaleLevel = this.thumbEl.getWidth() / 1200;
         }
 
-        canvas.width = this.thumbEl.getWidth() / this.getScaleLevel();
+        canvas.width = this.thumbEl.getWidth() / scaleLevel;
         
-        canvas.height = this.thumbEl.getHeight() / this.getScaleLevel();
+        canvas.height = this.thumbEl.getHeight() / scaleLevel;
 
 
         console.log("CANVAS WIDTH: " + canvas.width);
         console.log("CANVAS HEIGHT: " + canvas.height);
 
-        console.log("GETSCALELEVLE: " + this.getScaleLevel());
+        console.log("SCALELEVLE: " + scaleLevel);
 
         switch (this.rotate) {
             case 0 :
                 
-                var width = (this.thumbEl.getWidth() / this.getScaleLevel() > this.imageEl.OriginWidth) ? this.imageEl.OriginWidth : (this.thumbEl.getWidth() / this.getScaleLevel());
+                var width = (this.thumbEl.getWidth() / scaleLevel > this.imageEl.OriginWidth) ? this.imageEl.OriginWidth : (this.thumbEl.getWidth() / this.getScaleLevel());
                 var height = (this.thumbEl.getHeight() / this.getScaleLevel() > this.imageEl.OriginHeight) ? this.imageEl.OriginHeight : (this.thumbEl.getHeight() / this.getScaleLevel());
 
                 console.log("WIDTH: " + width);