Roo/dialog/UploadCropbox.js
authorleon <leon@roojs.com>
Tue, 9 Aug 2022 05:36:47 +0000 (13:36 +0800)
committerleon <leon@roojs.com>
Tue, 9 Aug 2022 05:36:47 +0000 (13:36 +0800)
Roo/dialog/UploadCropbox.js

index 3158882..d72b1b1 100644 (file)
@@ -507,7 +507,7 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component,  {
             console.log("canvas height: " + this.canvasEl.height);
             console.log("old canvas height: " + old_canvas_width);
             console.log("old canvas height: " + old_canvas_height);
-            this.previewEl.setLeft(pw);
+            this.previewEl.setLeft(old_pw - (this.canvsEl.width - old_canvs_width) / 2);
             this.previewEl.setTop(ph);
         }