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

Commit

Permalink
fix(tabs): md-center-tabs should work now
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Messerle committed Jul 16, 2015
1 parent d52e9c2 commit aa1e47d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/tabs/js/tabsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
defineBooleanAttribute('swipeContent');
defineBooleanAttribute('noDisconnect');
defineBooleanAttribute('autoselect');
defineBooleanAttribute('centerTabs');
defineBooleanAttribute('centerTabs', handleCenterTabs);

//-- define public properties
ctrl.scope = $scope;
Expand Down Expand Up @@ -153,6 +153,10 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
updateInkBarStyles();
}

function handleCenterTabs (newValue) {
ctrl.shouldCenterTabs = shouldCenterTabs();
}

function handleMaxTabWidth (newWidth, oldWidth) {
if (newWidth !== oldWidth) {
$mdUtil.nextTick(ctrl.updateInkBarStyles);
Expand Down

0 comments on commit aa1e47d

Please sign in to comment.