projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
261bfc9
)
Roo/dialog/UploadCropbox.js
author
leon
<leon@roojs.com>
Wed, 20 Jul 2022 09:04:11 +0000
(17:04 +0800)
committer
leon
<leon@roojs.com>
Wed, 20 Jul 2022 09:04:11 +0000
(17:04 +0800)
Roo/dialog/UploadCropbox.js
patch
|
blob
|
history
diff --git
a/Roo/dialog/UploadCropbox.js
b/Roo/dialog/UploadCropbox.js
index
fec330c
..
bd530af
100644
(file)
--- a/
Roo/dialog/UploadCropbox.js
+++ b/
Roo/dialog/UploadCropbox.js
@@
-891,17
+891,17
@@
Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, {
console.log(canvas.height);
if(canvas.width > this.outputMaxWidth) {
var scale = this.outputMaxWidth / canvas.width;
console.log(canvas.height);
if(canvas.width > this.outputMaxWidth) {
var scale = this.outputMaxWidth / canvas.width;
- // canvas.width = canvas.width * scale;
- // canvas.height = canvas.height * scale;
context.scale(scale, scale);
}
context.scale(scale, scale);
}
- console.log(canvas.width);
- console.log(canvas.height);
-
context.fillStyle = 'white';
context.fillRect(0, 0, canvas.width, canvas.height);
context.fillStyle = 'white';
context.fillRect(0, 0, canvas.width, canvas.height);
+ if(canvas.width > this.outputMaxWidth) {
+ canvas.width = canvas.width * scale;
+ canvas.height = canvas.height * scale;
+ }
+
context.drawImage(imageCanvas, sx, sy, width, height, x, y, width, height);
break;
context.drawImage(imageCanvas, sx, sy, width, height, x, y, width, height);
break;