Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tabs-extracted.js

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698