projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0429b73
)
Roo/dialog/UploadCropbox.js
author
leon
<leon@roojs.com>
Tue, 12 Jul 2022 03:03:11 +0000
(11:03 +0800)
committer
leon
<leon@roojs.com>
Tue, 12 Jul 2022 03:03:11 +0000
(11:03 +0800)
Roo/dialog/UploadCropbox.js
patch
|
blob
|
history
diff --git
a/Roo/dialog/UploadCropbox.js
b/Roo/dialog/UploadCropbox.js
index
e844a10
..
5776e90
100644
(file)
--- a/
Roo/dialog/UploadCropbox.js
+++ b/
Roo/dialog/UploadCropbox.js
@@
-872,13
+872,6
@@
Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, {
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
-
- canvas.width = this.minWidth;
-
- canvas.height = this.minHeight;
-
- console.log("CANVAS WIDTH: " + canvas.width);
- console.log("CANVAS HEIGHT: " + canvas.height);
console.log("GETSCALELEVLE: " + this.getScaleLevel());
console.log("GETSCALELEVLE: " + this.getScaleLevel());
@@
-890,6
+883,13
@@
Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, {
console.log("WIDTH: " + width);
console.log("HEIGHT: " + height);
console.log("WIDTH: " + width);
console.log("HEIGHT: " + height);
+
+ canvas.width = width;
+
+ canvas.height = height;
+
+ console.log("CANVAS WIDTH: " + canvas.width);
+ console.log("CANVAS HEIGHT: " + canvas.height);
var x = (this.thumbEl.getLeft(true) > this.previewEl.getLeft(true)) ? 0 : ((this.previewEl.getLeft(true) - this.thumbEl.getLeft(true)) / this.getScaleLevel());
var y = (this.thumbEl.getTop(true) > this.previewEl.getTop(true)) ? 0 : ((this.previewEl.getTop(true) - this.thumbEl.getTop(true)) / this.getScaleLevel());
var x = (this.thumbEl.getLeft(true) > this.previewEl.getLeft(true)) ? 0 : ((this.previewEl.getLeft(true) - this.thumbEl.getLeft(true)) / this.getScaleLevel());
var y = (this.thumbEl.getTop(true) > this.previewEl.getTop(true)) ? 0 : ((this.previewEl.getTop(true) - this.thumbEl.getTop(true)) / this.getScaleLevel());