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

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

Issue 2314283002: Roll Polymer (Closed)
Patch Set: dep Created 4 years, 3 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 Polymer({ 1 Polymer({
2 is: 'paper-toggle-button', 2 is: 'paper-toggle-button',
3 3
4 behaviors: [ 4 behaviors: [
5 Polymer.PaperCheckedElementBehavior 5 Polymer.PaperCheckedElementBehavior
6 ], 6 ],
7 7
8 hostAttributes: { 8 hostAttributes: {
9 role: 'button', 9 role: 'button',
10 'aria-pressed': 'false', 10 'aria-pressed': 'false',
(...skipping 10 matching lines...) Expand all
21 * Fired when the checked state changes. 21 * Fired when the checked state changes.
22 * 22 *
23 * @event iron-change 23 * @event iron-change
24 */ 24 */
25 }, 25 },
26 26
27 listeners: { 27 listeners: {
28 track: '_ontrack' 28 track: '_ontrack'
29 }, 29 },
30 30
31 attached: function() {
32 Polymer.RenderStatus.afterNextRender(this, function() {
33 this.setScrollDirection('y');
34 });
35 },
36
31 _ontrack: function(event) { 37 _ontrack: function(event) {
32 var track = event.detail; 38 var track = event.detail;
33 if (track.state === 'start') { 39 if (track.state === 'start') {
34 this._trackStart(track); 40 this._trackStart(track);
35 } else if (track.state === 'track') { 41 } else if (track.state === 'track') {
36 this._trackMove(track); 42 this._trackMove(track);
37 } else if (track.state === 'end') { 43 } else if (track.state === 'end') {
38 this._trackEnd(track); 44 this._trackEnd(track);
39 } 45 }
40 }, 46 },
(...skipping 25 matching lines...) Expand all
66 _createRipple: function() { 72 _createRipple: function() {
67 this._rippleContainer = this.$.toggleButton; 73 this._rippleContainer = this.$.toggleButton;
68 var ripple = Polymer.PaperRippleBehavior._createRipple(); 74 var ripple = Polymer.PaperRippleBehavior._createRipple();
69 ripple.id = 'ink'; 75 ripple.id = 'ink';
70 ripple.setAttribute('recenters', ''); 76 ripple.setAttribute('recenters', '');
71 ripple.classList.add('circle', 'toggle-ink'); 77 ripple.classList.add('circle', 'toggle-ink');
72 return ripple; 78 return ripple;
73 } 79 }
74 80
75 }); 81 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698