Roo/bootstrap/Modal.js
authorEdward <edward@roojs.com>
Mon, 17 Sep 2018 06:19:03 +0000 (14:19 +0800)
committerEdward <edward@roojs.com>
Mon, 17 Sep 2018 06:19:03 +0000 (14:19 +0800)
Roo/bootstrap/Modal.js

index 35e1941..5c95b9c 100644 (file)
@@ -268,6 +268,11 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component,  {
             this.setSize(w,h);
         }
         
+        if(!this.fitwindow && this.maxWidth !== 0){
+            var w = Math.min(this.maxWidth, Roo.lib.Dom.getViewportWidth(true) - 30);
+            var h = this.height || Roo.lib.Dom.getViewportHeight(true) - 60;
+            this.setSize(w,h);
+        }
         
     },