| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 Polymer({ | 3 Polymer({ |
| 4 | 4 |
| 5 is: 'paper-tabs', | 5 is: 'paper-tabs', |
| 6 | 6 |
| 7 behaviors: [ | 7 behaviors: [ |
| 8 Polymer.IronResizableBehavior, | 8 Polymer.IronResizableBehavior, |
| 9 Polymer.IronMenubarBehavior | 9 Polymer.IronMenubarBehavior |
| 10 ], | 10 ], |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 this.$.tabsContainer.scrollLeft += l; | 256 this.$.tabsContainer.scrollLeft += l; |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 }, | 259 }, |
| 260 | 260 |
| 261 _calcPercent: function(w, w0) { | 261 _calcPercent: function(w, w0) { |
| 262 return 100 * w / w0; | 262 return 100 * w / w0; |
| 263 }, | 263 }, |
| 264 | 264 |
| 265 _positionBar: function(width, left) { | 265 _positionBar: function(width, left) { |
| 266 width = width || 0; |
| 267 left = left || 0; |
| 268 |
| 266 this._width = width; | 269 this._width = width; |
| 267 this._left = left; | 270 this._left = left; |
| 268 this.transform( | 271 this.transform( |
| 269 'translate3d(' + left + '%, 0, 0) scaleX(' + (width / 100) + ')', | 272 'translate3d(' + left + '%, 0, 0) scaleX(' + (width / 100) + ')', |
| 270 this.$.selectionBar); | 273 this.$.selectionBar); |
| 271 }, | 274 }, |
| 272 | 275 |
| 273 _onBarTransitionEnd: function(e) { | 276 _onBarTransitionEnd: function(e) { |
| 274 var cl = this.$.selectionBar.classList; | 277 var cl = this.$.selectionBar.classList; |
| 275 // bar animation: expand -> contract | 278 // bar animation: expand -> contract |
| 276 if (cl.contains('expand')) { | 279 if (cl.contains('expand')) { |
| 277 cl.remove('expand'); | 280 cl.remove('expand'); |
| 278 cl.add('contract'); | 281 cl.add('contract'); |
| 279 this._positionBar(this._pos.width, this._pos.left); | 282 this._positionBar(this._pos.width, this._pos.left); |
| 280 // bar animation done | 283 // bar animation done |
| 281 } else if (cl.contains('contract')) { | 284 } else if (cl.contains('contract')) { |
| 282 cl.remove('contract'); | 285 cl.remove('contract'); |
| 283 } | 286 } |
| 284 } | 287 } |
| 285 | 288 |
| 286 }); | 289 }); |
| 287 | 290 |
| OLD | NEW |