Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(tabs): fixes tab sizing issues with and without pagination
Browse files Browse the repository at this point in the history
Closes #4065
Closes #4834
Closes #4873

Must test with #4744
  • Loading branch information
Robert Messerle committed Oct 6, 2015
1 parent 83ed1f3 commit e113774
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/tabs/js/tabsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,17 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
* Updates whether or not pagination should be displayed.
*/
function updatePagination () {
updatePagingWidth();
ctrl.maxTabWidth = getMaxTabWidth();
ctrl.shouldPaginate = shouldPaginate();
}

function updatePagingWidth() {
var width = 0;
angular.forEach(elements.dummies, function (element) { width += element.offsetWidth; });
angular.element(elements.paging).css('width', width + 'px');
}

function getMaxTabWidth () {
return $element.prop('clientWidth');
}
Expand Down

0 comments on commit e113774

Please sign in to comment.