| Index: third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
|
| diff --git a/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html b/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
|
| index a7664cb3b8d129af83127ab6055f206d37678ed7..7f8aa974c31602cc413dd19943a698b981a9ca4f 100644
|
| --- a/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
|
| +++ b/third_party/polymer/v0_8/components/paper-behaviors/paper-button-behavior.html
|
| @@ -13,7 +13,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
| <script>
|
|
|
| - Polymer.PaperButtonElevation = {
|
| + /** @polymerBehavior */
|
| + Polymer.PaperButtonBehaviorImpl = {
|
|
|
| properties: {
|
|
|
| @@ -23,24 +24,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
| },
|
|
|
| + observers: [
|
| + '_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)'
|
| + ],
|
| +
|
| + hostAttributes: {
|
| + role: 'button',
|
| + tabindex: '0'
|
| + },
|
| +
|
| _calculateElevation: function() {
|
| var e = 1;
|
| - if (this.disabled || !this.raised) {
|
| + if (this.disabled) {
|
| e = 0;
|
| } else if (this.active || this.pressed) {
|
| - e = 2;
|
| - } else if (this.focused) {
|
| + e = 4;
|
| + } else if (this.receivedFocusFromKeyboard) {
|
| e = 3;
|
| }
|
| this._elevation = e;
|
| }
|
| -
|
| };
|
|
|
| Polymer.PaperButtonBehavior = [
|
| - Polymer.IronControlState,
|
| Polymer.IronButtonState,
|
| - Polymer.PaperButtonElevation
|
| + Polymer.IronControlState,
|
| + Polymer.PaperButtonBehaviorImpl
|
| ];
|
|
|
| </script>
|
|
|