From 0e1820c0fdcbb9ae5d4edb295bb03fa52292ef03 Mon Sep 17 00:00:00 2001 From: Robert Messerle Date: Fri, 27 Mar 2015 13:50:52 -0700 Subject: [PATCH] update(tabs): fixes tab styles, reduces size of getLabel method --- src/components/tabs/js/tabDirective.js | 8 +------- src/components/tabs/tabs.scss | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/tabs/js/tabDirective.js b/src/components/tabs/js/tabDirective.js index 75b70eb7566..55aba017a09 100644 --- a/src/components/tabs/js/tabDirective.js +++ b/src/components/tabs/js/tabDirective.js @@ -92,13 +92,7 @@ scope.$on('$destroy', function () { ctrl.removeTab(data); }); function getLabel () { - //-- if label provided, then send label - if (attr.label) return attr.label; - //-- otherwise, we have to search for the `md-tab-label` element - var label = element.find('md-tab-label'); - if (label.length) return label.html(); - //-- otherwise, we have no label. - return element.html(); + return attr.label || (element.find('md-tab-label')[0] || element[0]).innerHTML; } function getTemplate () { diff --git a/src/components/tabs/tabs.scss b/src/components/tabs/tabs.scss index 2a33c7a6d84..578c6313463 100644 --- a/src/components/tabs/tabs.scss +++ b/src/components/tabs/tabs.scss @@ -17,7 +17,7 @@ md-tabs { border-radius: 2px; overflow: hidden; position: relative; - &:not('.md-no-tab-content') { + &:not(.md-no-tab-content) { min-height: 200 + $tabs-header-height; } &[md-align-tabs="bottom"] {