src/components/tabs/js/tabsController.js
function shouldPaginate () {
    var shouldPaginate;
    if (ctrl.noPagination || !loaded) return false;
    var canvasWidth = $element.prop('clientWidth');

    angular.forEach(getElements().tabs, function (tab) {
      canvasWidth -= tab.offsetWidth;
    });

    shouldPaginate = canvasWidth < 0;
    // Work around width calculation issues on IE11 when pagination is enabled.
    // Don't do this on other browsers because it breaks scroll to new tab animation.
    if ($mdUtil.msie) {
      if (shouldPaginate) {
        getElements().paging.style.width = '999999px';
      } else {
        getElements().paging.style.width = undefined;
      }
    }
    return shouldPaginate;
  }
function shouldPaginate () {
    var shouldPaginate;
    if (ctrl.noPagination || !loaded) return false;
    var canvasWidth = $element.prop('clientWidth');

    angular.forEach(getElements().tabs, function (tab) {
      canvasWidth -= tab.offsetWidth;
    });

    shouldPaginate = canvasWidth < 0;
    // Work around width calculation issues on IE11 when pagination is enabled.
    // Don't do this on other browsers because it breaks scroll to new tab animation.
    if ($mdUtil.msie) {
      if (shouldPaginate) {
        getElements().paging.style.width = '999999px';
      } else {
        getElements().paging.style.width = undefined;
      }
    }
    return shouldPaginate;
  }
function shouldPaginate ( ) { var shouldPaginate ; if ( ctrl . noPagination || ! loaded ) return false ; var canvasWidth = $element . prop ( 'clientWidth' ) ; angular . forEach ( getElements ( ) . tabs , function ( tab ) { canvasWidth -= tab . offsetWidth ; } ) ; shouldPaginate = canvasWidth < 0 ; // Work around width calculation issues on IE11 when pagination is enabled. // Don't do this on other browsers because it breaks scroll to new tab animation. if ( $mdUtil . msie ) { if ( shouldPaginate ) { getElements ( ) . paging . style . width = '999999px' ; } else { getElements ( ) . paging . style . width = undefined ; } } return shouldPaginate ; }
Determines if pagination is necessary to display the tabs within the available space.
@returns {boolean} true if pagination is necessary, false otherwise
Determines if pagination is necessary to display the tabs within the available space .