roojs-core.js
[roojs1] / roojs-bootstrap-debug.js
index 85f9c9f..6fbdf1d 100644 (file)
@@ -19877,6 +19877,8 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
             
         }
         
+        this.alignEl = on_el;
+
         if (!this.el) {
             this.render(document.body);
         }
@@ -19892,10 +19894,9 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
         this.el.show();
         this.el.dom.style.display = 'block';
          
-        
  
-        if (on_el) {
-            this.updatePosition(placement);
+        if (this.alignEl) {
+            this.updatePosition(this.placement, true);
              
         } else {
             // this is usually just done by the builder = to show the popoup in the middle of the scren.
@@ -19929,11 +19930,13 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
     },
     /**
      * fire this manually after loading a grid in the table for example
-     * @param {string} (left|right|top|bottom) where to try and put it
+     * @param {string} (left|right|top|bottom) where to try and put it (use false to use the last one)
      * @param {Boolean} try and move it if we cant get right position.
      */
     updatePosition : function(placement, try_move)
     {
+        placement = placement === false ? this.placement : placement;
+        
         this.el.removeClass([
             'fade','top','bottom', 'left', 'right','in',
             'bs-popover-top','bs-popover-bottom', 'bs-popover-left', 'bs-popover-right'