Roo/bootstrap/Menu.js
authorjohn <john@roojs.com>
Fri, 10 Aug 2018 04:51:51 +0000 (12:51 +0800)
committerjohn <john@roojs.com>
Fri, 10 Aug 2018 04:51:51 +0000 (12:51 +0800)
Roo/bootstrap/Menu.js

index f54cfb8..4ed8607 100644 (file)
@@ -279,10 +279,12 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
         this.hidden = false;
         this.triggerEl.addClass('open');
         
+        // reassign x when hitting right
         if(this.el.getWidth() + xy[0] >= Roo.lib.Dom.getViewWidth()){
             xy[0] = xy[0] - this.el.getWidth() + this.triggerEl.getWidth();
         }
         
+        // reassign y when hitting bottom
         if(this.el.getHeight() + xy[1] >= Roo.lib.Dom.getViewHeight()){
             xy[1] = this.el.getAlignToXY(this.triggerEl, '?')[1];
         }