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

Commit

Permalink
chore(tabs): adds comments describing previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Messerle committed Oct 5, 2015
1 parent 01b7af3 commit b8eabd3
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 @@ -635,11 +635,15 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
newHeight = contentHeight + tabsHeight,
currentHeight = $element.prop('offsetHeight');

// Adjusts calculations for when the buttons are bottom-aligned since this relies on absolute
// positioning. This should probably be cleaned up if a cleaner solution is possible.
if ($element.attr('md-align-tabs') === 'bottom') {
currentHeight -= tabsHeight;
newHeight -= tabsHeight;
// Need to include bottom border in these calculations
if ($element.attr('md-border-bottom') !== undefined) ++currentHeight;
}
if ($element.attr('md-border-bottom') !== undefined) ++currentHeight;

if (currentHeight === newHeight) return;

// Lock during animation so the user can't change tabs
Expand Down

0 comments on commit b8eabd3

Please sign in to comment.