OLD | NEW |
1 <!-- | 1 <!-- |
2 -- Copyright 2013 The Chromium Authors. All rights reserved. | 2 -- Copyright 2013 The Chromium Authors. All rights reserved. |
3 -- Use of this source code is governed by a BSD-style license that can be | 3 -- Use of this source code is governed by a BSD-style license that can be |
4 -- found in the LICENSE file. | 4 -- found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <polymer-element name="kb-key" extends="kb-key-base" | 7 <polymer-element name="kb-key" extends="kb-key-base" |
8 attributes="image imageSize keyCode keyName shiftModifier weight"> | 8 attributes="image imageSize keyCode keyName shiftModifier weight"> |
9 <template> | 9 <template> |
10 <style> | 10 <style> |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 }, | 145 }, |
146 | 146 |
147 /** | 147 /** |
148 * Adjusts the CSS rules for rendering the key to reflect the new | 148 * Adjusts the CSS rules for rendering the key to reflect the new |
149 * weight. The preferred way is to use {{weight}} directly in the CSS | 149 * weight. The preferred way is to use {{weight}} directly in the CSS |
150 * rules; however, this is currently broken in the Polymer library. | 150 * rules; however, this is currently broken in the Polymer library. |
151 * TODO(kevers): Cleanup once handling of {{}} in CSS rules is fixed. | 151 * TODO(kevers): Cleanup once handling of {{}} in CSS rules is fixed. |
152 */ | 152 */ |
153 weightChanged: function() { | 153 weightChanged: function() { |
154 if (this.weight > 0) | 154 if (this.weight > 0) |
155 this.style['webkitBoxFlex'] = this.weight; | 155 this.style.webkitBoxFlex = this.weight; |
156 }, | 156 }, |
157 }); | 157 }); |
158 </script> | 158 </script> |
159 </polymer-element> | 159 </polymer-element> |
160 | 160 |
161 <!-- Special keys --> | 161 <!-- Special keys --> |
162 <polymer-element name="kb-abc-key" class="symbol dark" char="Invalid" | 162 <polymer-element name="kb-abc-key" class="symbol dark" char="Invalid" |
163 extends="kb-key" weight="125"> | 163 extends="kb-key" weight="125"> |
164 <script> | 164 <script> |
165 Polymer('kb-abc-key', { | 165 Polymer('kb-abc-key', { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 up: function(event) { | 213 up: function(event) { |
214 if (this.longPressTimer) { | 214 if (this.longPressTimer) { |
215 clearTimeout(this.longPressTimer); | 215 clearTimeout(this.longPressTimer); |
216 hideKeyboard(); | 216 hideKeyboard(); |
217 this.longPressTimer = undefined; | 217 this.longPressTimer = undefined; |
218 } | 218 } |
219 } | 219 } |
220 }); | 220 }); |
221 </script> | 221 </script> |
222 </polymer-element> | 222 </polymer-element> |
OLD | NEW |