Roo/bootstrap/UploadCropbox.js
authoredward <edward@roojs.com>
Tue, 19 Jan 2016 07:22:28 +0000 (15:22 +0800)
committeredward <edward@roojs.com>
Tue, 19 Jan 2016 07:22:28 +0000 (15:22 +0800)
Roo/bootstrap/UploadCropbox.js

index f1b0b00..2aee1ce 100644 (file)
@@ -197,8 +197,8 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
     
     setBackground : function()
     {
-        var w =  parseInt(this.image.dom.width) * this.ratio;
-        var h =  parseInt(this.image.dom.height) * this.ratio;
+        var w =  parseInt(this.image.getWidth()) * this.ratio;
+        var h =  parseInt(this.image.getHeight()) * this.ratio;
 
         var pw = (this.imageSection.dom.clientWidth - w) / 2;
         var ph = (this.imageSection.dom.clientHeight - h) / 2;