| OLD | NEW |
| 1 Polymer({ | 1 Polymer({ |
| 2 is: 'paper-button', | 2 is: 'paper-button', |
| 3 | 3 |
| 4 behaviors: [ | 4 behaviors: [ |
| 5 Polymer.PaperButtonBehavior | 5 Polymer.PaperButtonBehavior |
| 6 ], | 6 ], |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 /** |
| 10 * If true, the button should be styled with a shadow. |
| 11 */ |
| 12 raised: { |
| 13 type: Boolean, |
| 14 reflectToAttribute: true, |
| 15 value: false, |
| 16 observer: '_calculateElevation' |
| 17 } |
| 18 }, |
| 19 |
| 20 _calculateElevation: function() { |
| 21 if (!this.raised) { |
| 22 this._setElevation(0); |
| 23 } else { |
| 24 Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this); |
| 25 } |
| 26 } |
| 27 |
| 9 /** | 28 /** |
| 10 * If true, the button should be styled with a shadow. | 29 Fired when the animation finishes. |
| 11 */ | 30 This is useful if you want to wait until |
| 12 raised: { | 31 the ripple animation finishes to perform some action. |
| 13 type: Boolean, | |
| 14 reflectToAttribute: true, | |
| 15 value: false, | |
| 16 observer: '_calculateElevation' | |
| 17 } | |
| 18 }, | |
| 19 | 32 |
| 20 _calculateElevation: function() { | 33 @event transitionend |
| 21 if (!this.raised) { | 34 Event param: {{node: Object}} detail Contains the animated node. |
| 22 this._setElevation(0); | 35 */ |
| 23 } else { | 36 }); |
| 24 Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this); | |
| 25 } | |
| 26 } | |
| 27 /** | |
| 28 | |
| 29 Fired when the animation finishes. | |
| 30 This is useful if you want to wait until | |
| 31 the ripple animation finishes to perform some action. | |
| 32 | |
| 33 @event transitionend | |
| 34 @param {{node: Object}} detail Contains the animated node. | |
| 35 */ | |
| 36 }); | |
| OLD | NEW |