X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;h=c9b83ff0a14da9c3e3ae976c6282b2f130c22309;hp=4412a6d45a321d467129a98f490827e6eb4313e0;hb=refs%2Fheads%2Fwip_leon_T7094_logo_image_upload_in_boilerplate;hpb=15e50c33b49747cf8b361ffc7ca801d0e641b96a diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 4412a6d45a..c9b83ff0a1 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -44601,14 +44601,12 @@ Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, { var scale = this.outputMaxWidth / canvas.width; canvas.width = canvas.width * scale; canvas.height = canvas.height * scale; - context.fillStyle = 'white'; - context.fillRect(0, 0, canvas.width, canvas.height); context.scale(scale, scale); } - else { - context.fillStyle = 'white'; - context.fillRect(0, 0, canvas.width, canvas.height); - } + + context.fillStyle = 'white'; + context.fillRect(0, 0, this.thumbEl.getWidth() / this.getScaleLevel(), this.thumbEl.getHeight() / this.getScaleLevel()); + context.drawImage(imageCanvas, sx, sy, width, height, x, y, width, height);