Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: third_party/polymer/v0_8/components-chromium/paper-behaviors/paper-button-behavior-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 2
3 Polymer.PaperButtonElevation = { 3 /** @polymerBehavior */
4 Polymer.PaperButtonBehaviorImpl = {
4 5
5 properties: { 6 properties: {
6 7
7 _elevation: { 8 _elevation: {
8 type: Number 9 type: Number
9 } 10 }
10 11
11 }, 12 },
12 13
14 observers: [
15 '_calculateElevation(focused, disabled, active, pressed, receivedFocusFrom Keyboard)'
16 ],
17
18 hostAttributes: {
19 role: 'button',
20 tabindex: '0'
21 },
22
13 _calculateElevation: function() { 23 _calculateElevation: function() {
14 var e = 1; 24 var e = 1;
15 if (this.disabled || !this.raised) { 25 if (this.disabled) {
16 e = 0; 26 e = 0;
17 } else if (this.active || this.pressed) { 27 } else if (this.active || this.pressed) {
18 e = 2; 28 e = 4;
19 } else if (this.focused) { 29 } else if (this.receivedFocusFromKeyboard) {
20 e = 3; 30 e = 3;
21 } 31 }
22 this._elevation = e; 32 this._elevation = e;
23 } 33 }
24
25 }; 34 };
26 35
27 Polymer.PaperButtonBehavior = [ 36 Polymer.PaperButtonBehavior = [
37 Polymer.IronButtonState,
28 Polymer.IronControlState, 38 Polymer.IronControlState,
29 Polymer.IronButtonState, 39 Polymer.PaperButtonBehaviorImpl
30 Polymer.PaperButtonElevation
31 ]; 40 ];
32 41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698