src/sap.ui.commons/src/sap/ui/commons/MenuBar.js
function(oThis){
		var iVisibleItems = 0;

		var jAreaRef = oThis.$("area");
		var jItems = jAreaRef.children();

		var bRtl = sap.ui.getCore().getConfiguration().getRTL();
		var lastOffsetLeft = (bRtl ? 100000 : 0);

		jItems.each(function(iIdx) {
			if (iIdx == 0) {
				return true;
			}

			var currentOffsetLeft = this.offsetLeft;
			var bLineBreak = (bRtl ? (currentOffsetLeft >= lastOffsetLeft) : (currentOffsetLeft <= lastOffsetLeft));

			if (bLineBreak) {
				iVisibleItems = iIdx;
				return false;
			} else if (jQuery(this).attr("id") == oThis.getId() + "-ovrflw") {
				// This is the overflow button, there was no line break
				iVisibleItems = iIdx;
				return false;
			} else {
				// Regular item, to the right of the last one, so just proceed
				lastOffsetLeft = currentOffsetLeft;
				return true;
			}
		});

		return iVisibleItems;
	}
function(oThis){
		var iVisibleItems = 0;

		var jAreaRef = oThis.$("area");
		var jItems = jAreaRef.children();

		var bRtl = sap.ui.getCore().getConfiguration().getRTL();
		var lastOffsetLeft = (bRtl ? 100000 : 0);

		jItems.each(function(iIdx) {
			if (iIdx == 0) {
				return true;
			}

			var currentOffsetLeft = this.offsetLeft;
			var bLineBreak = (bRtl ? (currentOffsetLeft >= lastOffsetLeft) : (currentOffsetLeft <= lastOffsetLeft));

			if (bLineBreak) {
				iVisibleItems = iIdx;
				return false;
			} else if (jQuery(this).attr("id") == oThis.getId() + "-ovrflw") {
				// This is the overflow button, there was no line break
				iVisibleItems = iIdx;
				return false;
			} else {
				// Regular item, to the right of the last one, so just proceed
				lastOffsetLeft = currentOffsetLeft;
				return true;
			}
		});

		return iVisibleItems;
	}
function ( oThis ) { var iVisibleItems = 0 ; var jAreaRef = oThis . $ ( "area" ) ; var jItems = jAreaRef . children ( ) ; var bRtl = sap . ui . getCore ( ) . getConfiguration ( ) . getRTL ( ) ; var lastOffsetLeft = ( bRtl ? 100000 : 0 ) ; jItems . each ( function ( iIdx ) { if ( iIdx == 0 ) { return true ; } var currentOffsetLeft = this . offsetLeft ; var bLineBreak = ( bRtl ? ( currentOffsetLeft >= lastOffsetLeft ) : ( currentOffsetLeft <= lastOffsetLeft ) ) ; if ( bLineBreak ) { iVisibleItems = iIdx ; return false ; } else if ( jQuery ( this ) . attr ( "id" ) == oThis . getId ( ) + "-ovrflw" ) { // This is the overflow button, there was no line break iVisibleItems = iIdx ; return false ; } else { // Regular item, to the right of the last one, so just proceed lastOffsetLeft = currentOffsetLeft ; return true ; } } ) ; return iVisibleItems ; }
Compute actual number of items currently hidden due to overflow
Compute actual number of items currently hidden due to overflow