| OLD | NEW |
| 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 Loading... |
| 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').trim(); |
| 39 // If unset, compute and set the default `--paper-radio-button-ink-size`
. |
| 40 if (inkSize === '-1px') { |
| 41 var size = parseFloat(this.getComputedStyleValue('--calculated-paper-r
adio-button-size').trim()); |
| 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 }); |
| OLD | NEW |