3 Polymer('paper-tabs', {
6 * If true, ink effect is disabled.
15 * If true, the bottom bar to indicate the selected tab will not be shown.
23 activateEvent: 'down',
27 selectedIndexChanged: function(old) {
28 var s = this.$.selectionBar.style;
30 if (!this.selectedItem) {
36 var w = 100 / this.items.length;
38 if (this.nostretch || old === null || old === -1) {
40 s.left = this.selectedIndex * w + '%';
45 this.$.selectionBar.classList.add('expand');
46 if (old < this.selectedIndex) {
47 s.width = w + w * (this.selectedIndex - old) - m + '%';
49 s.width = w + w * (old - this.selectedIndex) - m + '%';
50 s.left = this.selectedIndex * w + m + '%';
54 barTransitionEnd: function() {
55 var cl = this.$.selectionBar.classList;
56 if (cl.contains('expand')) {
59 var s = this.$.selectionBar.style;
60 var w = 100 / this.items.length;
62 s.left = this.selectedIndex * w + '%';
63 } else if (cl.contains('contract')) {
64 cl.remove('contract');