| OLD | NEW |
| 1 Polymer({ | 1 Polymer({ |
| 2 is: 'paper-slider', | 2 is: 'paper-slider', |
| 3 | 3 |
| 4 behaviors: [ | 4 behaviors: [ |
| 5 Polymer.IronFormElementBehavior, | 5 Polymer.IronFormElementBehavior, |
| 6 Polymer.PaperInkyFocusBehavior, | 6 Polymer.PaperInkyFocusBehavior, |
| 7 Polymer.IronRangeBehavior | 7 Polymer.IronRangeBehavior |
| 8 ], | 8 ], |
| 9 | 9 |
| 10 properties: { | 10 properties: { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 value: false | 48 value: false |
| 49 }, | 49 }, |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * The immediate value of the slider. This value is updated while the use
r | 52 * The immediate value of the slider. This value is updated while the use
r |
| 53 * is dragging the slider. | 53 * is dragging the slider. |
| 54 */ | 54 */ |
| 55 immediateValue: { | 55 immediateValue: { |
| 56 type: Number, | 56 type: Number, |
| 57 value: 0, | 57 value: 0, |
| 58 readOnly: true | 58 readOnly: true, |
| 59 notify: true |
| 59 }, | 60 }, |
| 60 | 61 |
| 61 /** | 62 /** |
| 62 * The maximum number of markers | 63 * The maximum number of markers |
| 63 */ | 64 */ |
| 64 maxMarkers: { | 65 maxMarkers: { |
| 65 type: Number, | 66 type: Number, |
| 66 value: 0, | 67 value: 0, |
| 67 notify: true, | 68 notify: true, |
| 68 observer: '_maxMarkersChanged' | 69 observer: '_maxMarkersChanged' |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 }, | 310 }, |
| 310 | 311 |
| 311 _mergeClasses: function(classes) { | 312 _mergeClasses: function(classes) { |
| 312 return Object.keys(classes).filter( | 313 return Object.keys(classes).filter( |
| 313 function(className) { | 314 function(className) { |
| 314 return classes[className]; | 315 return classes[className]; |
| 315 }).join(' '); | 316 }).join(' '); |
| 316 }, | 317 }, |
| 317 | 318 |
| 318 _getClassNames: function() { | 319 _getClassNames: function() { |
| 319 var classes = {}; | |
| 320 | |
| 321 classes.disabled = this.disabled; | |
| 322 classes.pin = this.pin; | |
| 323 classes.snaps = this.snaps; | |
| 324 classes.ring = this.immediateValue <= this.min; | |
| 325 classes.expand = this.expand; | |
| 326 classes.dragging = this.dragging; | |
| 327 classes.transiting = this.transiting; | |
| 328 classes.editable = this.editable; | |
| 329 | |
| 330 return this._mergeClasses(classes); | |
| 331 }, | |
| 332 | |
| 333 _getProgressClass: function() { | |
| 334 return this._mergeClasses({ | 320 return this._mergeClasses({ |
| 335 transiting: this.transiting | 321 disabled: this.disabled, |
| 322 pin: this.pin, |
| 323 snaps: this.snaps, |
| 324 ring: this.immediateValue <= this.min, |
| 325 expand: this.expand, |
| 326 dragging: this.dragging, |
| 327 transiting: this.transiting, |
| 328 editable: this.editable |
| 336 }); | 329 }); |
| 337 }, | 330 }, |
| 338 | 331 |
| 339 _incrementKey: function(event) { | 332 _incrementKey: function(event) { |
| 340 if (event.detail.key === 'end') { | 333 if (event.detail.key === 'end') { |
| 341 this.value = this.max; | 334 this.value = this.max; |
| 342 } else { | 335 } else { |
| 343 this.increment(); | 336 this.increment(); |
| 344 } | 337 } |
| 345 this.fire('change'); | 338 this.fire('change'); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 368 */ | 361 */ |
| 369 | 362 |
| 370 /** | 363 /** |
| 371 * Fired when the slider's value changes due to user interaction. | 364 * Fired when the slider's value changes due to user interaction. |
| 372 * | 365 * |
| 373 * Changes to the slider's value due to changes in an underlying | 366 * Changes to the slider's value due to changes in an underlying |
| 374 * bound variable will not trigger this event. | 367 * bound variable will not trigger this event. |
| 375 * | 368 * |
| 376 * @event change | 369 * @event change |
| 377 */ | 370 */ |
| OLD | NEW |