Index: third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js |
diff --git a/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9c0fade69a2b8f186aaca687f98f09113897cccc |
--- /dev/null |
+++ b/third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js |
@@ -0,0 +1,32 @@ |
+ |
+ |
+ Polymer.PaperButtonElevation = { |
+ |
+ properties: { |
+ |
+ _elevation: { |
+ type: Number |
+ } |
+ |
+ }, |
+ |
+ _calculateElevation: function() { |
+ var e = 1; |
+ if (this.disabled || !this.raised) { |
+ e = 0; |
+ } else if (this.active || this.pressed) { |
+ e = 2; |
+ } else if (this.focused) { |
+ e = 3; |
+ } |
+ this._elevation = e; |
+ } |
+ |
+ }; |
+ |
+ Polymer.PaperButtonBehavior = [ |
+ Polymer.IronControlState, |
+ Polymer.IronButtonState, |
+ Polymer.PaperButtonElevation |
+ ]; |
+ |