Explorar el Código

Ticket #4623 - Core: Update in More Auto menus recalculation.

AntonLV hace 2 años
padre
commit
97e73b42ef
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      inc/js/classes/BxDolMenuMoreAuto.js

+ 3 - 3
inc/js/classes/BxDolMenuMoreAuto.js

@@ -46,7 +46,7 @@ BxDolMenuMoreAuto.prototype.init = function() {
 
     var iParent = oMenu.parent().width();
     var iItemMore = $this._getWidth(oItemMore);
-        
+
     oMenu.css('overflow', 'visible');
 
     if(iMenu >= iParent || this._bStaticMode)
@@ -81,11 +81,11 @@ BxDolMenuMoreAuto.prototype.update = function(bForceCalculate)
 
     var iMenu = 0;
     oMenu.children(this._sClassItem + ':visible').each(function() {
-        iMenu += $this._getWidth($(this), bForceCalculate);
+        iMenu += $this._getWidth($(this), $(this).not($this._sClassItemMore).length ? bForceCalculate : false);
     });
 
     var iParent = oMenu.parent().width();
-    var iItemMore = oItemMore.outerWidth(true);
+    var iItemMore = $this._getWidth(oItemMore, false);
 
     if(iMenu > iParent)
         this._moveToSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore);