| OLD | NEW |
| 1 (function() { | 1 (function() { |
| 2 'use strict'; | 2 'use strict'; |
| 3 | 3 |
| 4 Polymer({ | 4 Polymer({ |
| 5 is: 'paper-dropdown-menu', | 5 is: 'paper-dropdown-menu', |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Fired when the dropdown opens. | 8 * Fired when the dropdown opens. |
| 9 * | 9 * |
| 10 * @event paper-dropdown-open | 10 * @event paper-dropdown-open |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // NOTE(cdata): These numbers are somewhat magical because they are | 239 // NOTE(cdata): These numbers are somewhat magical because they are |
| 240 // derived from the metrics of elements internal to `paper-input`'s | 240 // derived from the metrics of elements internal to `paper-input`'s |
| 241 // template. The metrics will change depending on whether or not the | 241 // template. The metrics will change depending on whether or not the |
| 242 // input has a floating label. | 242 // input has a floating label. |
| 243 return noLabelFloat ? -4 : 8; | 243 return noLabelFloat ? -4 : 8; |
| 244 }, | 244 }, |
| 245 | 245 |
| 246 /** | 246 /** |
| 247 * Returns false if the element is required and does not have a selectio
n, | 247 * Returns false if the element is required and does not have a selectio
n, |
| 248 * and true otherwise. | 248 * and true otherwise. |
| 249 * @param {*=} _value Ignored. |
| 249 * @return {boolean} true if `required` is false, or if `required` is tr
ue | 250 * @return {boolean} true if `required` is false, or if `required` is tr
ue |
| 250 * and the element has a valid selection. | 251 * and the element has a valid selection. |
| 251 */ | 252 */ |
| 252 _getValidity: function() { | 253 _getValidity: function(_value) { |
| 253 return this.disabled || !this.required || (this.required && this.value
); | 254 return this.disabled || !this.required || (this.required && !!this.val
ue); |
| 254 }, | 255 }, |
| 255 | 256 |
| 256 _openedChanged: function() { | 257 _openedChanged: function() { |
| 257 var openState = this.opened ? 'true' : 'false'; | 258 var openState = this.opened ? 'true' : 'false'; |
| 258 var e = this.contentElement; | 259 var e = this.contentElement; |
| 259 if (e) { | 260 if (e) { |
| 260 e.setAttribute('aria-expanded', openState); | 261 e.setAttribute('aria-expanded', openState); |
| 261 } | 262 } |
| 262 } | 263 } |
| 263 }); | 264 }); |
| 264 })(); | 265 })(); |
| OLD | NEW |