| OLD | NEW |
| (Empty) |
| 1 | |
| 2 | |
| 3 /** @polymerBehavior */ | |
| 4 Polymer.PaperButtonBehaviorImpl = { | |
| 5 | |
| 6 properties: { | |
| 7 | |
| 8 _elevation: { | |
| 9 type: Number | |
| 10 } | |
| 11 | |
| 12 }, | |
| 13 | |
| 14 observers: [ | |
| 15 '_calculateElevation(focused, disabled, active, pressed, receivedFocusFrom
Keyboard)' | |
| 16 ], | |
| 17 | |
| 18 hostAttributes: { | |
| 19 role: 'button', | |
| 20 tabindex: '0' | |
| 21 }, | |
| 22 | |
| 23 _calculateElevation: function() { | |
| 24 var e = 1; | |
| 25 if (this.disabled) { | |
| 26 e = 0; | |
| 27 } else if (this.active || this.pressed) { | |
| 28 e = 4; | |
| 29 } else if (this.receivedFocusFromKeyboard) { | |
| 30 e = 3; | |
| 31 } | |
| 32 this._elevation = e; | |
| 33 } | |
| 34 }; | |
| 35 | |
| 36 Polymer.PaperButtonBehavior = [ | |
| 37 Polymer.IronButtonState, | |
| 38 Polymer.IronControlState, | |
| 39 Polymer.PaperButtonBehaviorImpl | |
| 40 ]; | |
| 41 | |
| OLD | NEW |