refactor(tabs): adds support for non-fixed tabs

Closes #825.
Closes #460.
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:

  acmeideal@gmail.com
    Domain biomassiv.es has exceeded the max emails per hour (106/100 (106%)) allowed.  Message will be reattempted later

------- This is a copy of the message, including all the headers. ------
Received: from github-smtp2-ext4.iad.github.net ([192.30.252.195]:58282 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
	by server23.websitehostserver.net with esmtps (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256)
	(Exim 4.82)
	(envelope-from <noreply@github.com>)
	id 1Y0aiB-002yfB-Ve
	for greg@biomassiv.es; Mon, 15 Dec 2014 12:49:41 -0600
Date: Mon, 15 Dec 2014 10:49:39 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
	s=pf2014; t=1418669379;
	bh=PHJeCsx+Qy30dF45roTiMRbOC0qlMB3+zLIiMxldI60=;
	h=From:Reply-To:To:In-Reply-To:References:Subject:List-ID:
	 List-Archive:List-Post:List-Unsubscribe:From;
	b=nBnCsfMFhgbpvXgXe/uih/BG7Yp9kmKSqNOgka2boitWOiGCR3ln0P3ye3R/S8gRU
	 BtYxuei5bN+eRKtEFXAT/cr8PA8k79awXGVaCVHrAp+ev2b1Dk0h0BZK0hfGvuUy+J
	 16TL7zSKk3zidEq09UE/iopJFyg0TMdzgDcr2ZPw=
From: Robert Messerle <notifications@github.com>
Reply-To: angular/material <reply@reply.github.com>
To: angular/material <material@noreply.github.com>
Message-ID: <angular/material/pull/921/r21846469@github.com>
In-Reply-To: <angular/material/pull/921@github.com>
References: <angular/material/pull/921@github.com>
Subject: Re: [material] refactor(tabs): adds support for non-fixed tabs (#921)
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="--==_mimepart_548f2d43be10d_79903fa6555792bc10742e2";
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: robertmesserle
X-GitHub-Recipient: biomassives
List-ID: angular/material <material.angular.github.com>
List-Archive: https://github.com/angular/material
List-Post: <mailto:reply@reply.github.com>
List-Unsubscribe: <mailto:unsub+0042d4e27bf193df76d7823a6fcc25ac46f794255b8ad1fb92cf0000000110a6ef4392a170ce014d59c5@reply.github.com>,
 <https://github.com/notifications/unsubscribe/AELU4s_TKfAzszW0RuZyZZnAcdEdthpkks5nXyTDgaJpZM4DHdF3>
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: greg@biomassiv.es
X-Spam-Status: No, score=-0.9
X-Spam-Score: -8
X-Spam-Bar: /
X-Ham-Report: Spam detection software, running on the system "server23.websitehostserver.net", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 root\@localhost for details.
 
 Content preview:  > @@ -160,31 +146,108 @@ function TabPaginationDirective($mdConstant,
    $window, $$rAF, $$q, $timeout) { > } > } > > + function stretchTabs() { >
    + switch (scope.stretchTabs) { > + case 'no': return false; > + case 'yes':
    return true; > + default: return $mdMedia('sm'); > + } > + } > + > + function
    calculateTabData() { > + var clientWidth = element.parent().prop('offsetWidth');
    > + var tabsWidth = clientWidth - PAGINATORS_WIDTH - 1; > + var tabs = element[0].querySelectorAll('md-tab');
    [...] 
 
 Content analysis details:   (-0.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was blocked.
                             See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: github.com]
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
  0.0 HTML_MESSAGE           BODY: HTML included in message
  1.1 HTML_IMAGE_ONLY_16     BODY: HTML: images with 1200-1600 bytes of words
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
                             domain
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
X-Spam-Flag: NO


----==_mimepart_548f2d43be10d_79903fa6555792bc10742e2
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

> @@ -160,31 +146,108 @@ function TabPaginationDirective($mdConstant, $window, $$rAF, $$q, $timeout) {
>        }
>      }
>  
> +    function stretchTabs() {
> +      switch (scope.stretchTabs) {
> +        case 'no':  return false;
> +        case 'yes': return true;
> +        default:    return $mdMedia('sm');
> +      }
> +    }
> +
> +    function calculateTabData() {
> +      var clientWidth = element.parent().prop('offsetWidth');
> +      var tabsWidth = clientWidth - PAGINATORS_WIDTH - 1;
> +      var tabs = element[0].querySelectorAll('md-tab');

Good call, adding.

---
Reply to this email directly or view it on GitHub:
https://github.com/angular/material/pull/921/files#r21846469
----==_mimepart_548f2d43be10d_79903fa6555792bc10742e2
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>In <a href="https://github.com/angular/material/pull/921#discussion-diff-21846469">src/components/tabs/js/paginationDirective.js</a>:</p>
<pre style='color:#555'>&gt; @@ -160,31 +146,108 @@ function TabPaginationDirective($mdConstant, $window, $$rAF, $$q, $timeout) {
&gt;        }
&gt;      }
&gt;  
&gt; +    function stretchTabs() {
&gt; +      switch (scope.stretchTabs) {
&gt; +        case &#39;no&#39;:  return false;
&gt; +        case &#39;yes&#39;: return true;
&gt; +        default:    return $mdMedia(&#39;sm&#39;);
&gt; +      }
&gt; +    }
&gt; +
&gt; +    function calculateTabData() {
&gt; +      var clientWidth = element.parent().prop(&#39;offsetWidth&#39;);
&gt; +      var tabsWidth = clientWidth - PAGINATORS_WIDTH - 1;
&gt; +      var tabs = element[0].querySelectorAll(&#39;md-tab&#39;);
</pre>
<p>Good call, adding.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/angular/material/pull/921/files#r21846469">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AELU4h15qGyObBCq-3UxkwOZ6G3ldYXHks5nXyTDgaJpZM4DHdF3.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/angular/material/pull/921/files#r21846469"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

----==_mimepart_548f2d43be10d_79903fa6555792bc10742e2--