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

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

Issue 2526053002: MD Settings: roll paper-radio-button, 1.2.1 -> 1.3.1 (Closed)
Patch Set: Created 4 years 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-radio-button', 2 is: 'paper-radio-button',
3 3
4 behaviors: [ 4 behaviors: [
5 Polymer.PaperCheckedElementBehavior 5 Polymer.PaperCheckedElementBehavior
6 ], 6 ],
7 7
8 hostAttributes: { 8 hostAttributes: {
9 role: 'radio', 9 role: 'radio',
10 'aria-checked': false, 10 'aria-checked': false,
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 ariaActiveAttribute: { 27 ariaActiveAttribute: {
28 type: String, 28 type: String,
29 value: 'aria-checked' 29 value: 'aria-checked'
30 } 30 }
31 }, 31 },
32 32
33 ready: function() { 33 ready: function() {
34 this._rippleContainer = this.$.radioContainer; 34 this._rippleContainer = this.$.radioContainer;
35 } 35 },
36
37 attached: function() {
38 var inkSize = this.getComputedStyleValue('--calculated-paper-radio-butto n-ink-size');
39 // If unset, compute and set the default `--paper-radio-button-ink-size` .
40 if (inkSize === '-1px') {
dpapad 2016/11/24 00:02:45 I did a sanity check, and there is a problem in th
41 var size = parseFloat(this.getComputedStyleValue('--calculated-paper-r adio-button-size'));
42 var defaultInkSize = Math.floor(3 * size);
43
44 // The button and ripple need to have the same parity so that their
45 // centers align.
46 if (defaultInkSize % 2 !== size % 2) {
47 defaultInkSize++;
48 }
49
50 this.customStyle['--paper-radio-button-ink-size'] = defaultInkSize + ' px';
51 this.updateStyles();
52 }
53 },
36 }); 54 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698