OLD | NEW |
1 <!-- | 1 <!-- |
2 @license | 2 @license |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
9 --> | 9 --> |
10 | 10 |
11 <link rel="import" href="../../polymer/polymer.html"> | 11 <link rel="import" href="../../polymer/polymer.html"> |
12 <link rel="import" href="../../paper-ripple/paper-ripple.html"> | 12 <link rel="import" href="../../paper-ripple/paper-ripple.html"> |
13 <link rel="import" href="../paper-inky-focus-behavior.html"> | 13 <link rel="import" href="../paper-checked-element-behavior.html"> |
14 | 14 |
15 <dom-module id="paper-radio-button"> | 15 <dom-module id="paper-radio-button"> |
16 | 16 |
17 <style> | 17 <style> |
18 :host { | 18 :host { |
19 display: inline-block; | 19 display: inline-block; |
20 white-space: nowrap; | 20 white-space: nowrap; |
21 } | 21 } |
22 | 22 |
23 :host(:focus) { | 23 :host(:focus) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 width: 48px; | 82 width: 48px; |
83 height: 48px; | 83 height: 48px; |
84 } | 84 } |
85 | 85 |
86 </style> | 86 </style> |
87 | 87 |
88 <template> | 88 <template> |
89 <div id="radioContainer"> | 89 <div id="radioContainer"> |
90 <div id="offRadio"></div> | 90 <div id="offRadio"></div> |
91 <div id="onRadio"></div> | 91 <div id="onRadio"></div> |
92 <paper-ripple id="ink" class="circle" center></paper-ripple> | |
93 </div> | 92 </div> |
94 </template> | 93 </template> |
95 | 94 |
96 <script> | 95 <script> |
97 | 96 |
98 Polymer({ | 97 Polymer({ |
99 | 98 |
100 behaviors: [ | 99 behaviors: [ |
101 Polymer.PaperInkyFocusBehavior | 100 Polymer.PaperCheckedElementBehavior |
102 ], | 101 ], |
103 | 102 |
104 hostAttributes: { | 103 hostAttributes: { |
105 role: 'radio' | 104 role: 'radio' |
106 }, | 105 }, |
107 | 106 |
108 ready: function() { | 107 ready: function() { |
109 this.toggles = true; | 108 this.toggles = true; |
| 109 }, |
| 110 |
| 111 _createRipple: function() { |
| 112 this._rippleContainer = this.$.radioContainer; |
| 113 return Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this); |
110 } | 114 } |
111 | 115 |
112 }); | 116 }); |
113 | 117 |
114 </script> | 118 </script> |
115 | 119 |
116 </dom-module> | 120 </dom-module> |
OLD | NEW |