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

Side by Side Diff: third_party/polymer/v0_8/components-chromium/paper-button/paper-button-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({ 3 Polymer({
4 4
5 is: 'paper-button', 5 is: 'paper-button',
6 6
7 behaviors: [ 7 behaviors: [
8 Polymer.PaperButtonBehavior 8 Polymer.PaperButtonBehavior
9 ], 9 ],
10 10
11 properties: { 11 properties: {
12 12
13 /** 13 /**
14 * If true, the button should be styled with a shadow. 14 * If true, the button should be styled with a shadow.
15 *
16 * @attribute raised
17 * @type boolean
18 * @default false
19 */ 15 */
20 raised: { 16 raised: {
21 type: Boolean, 17 type: Boolean,
22 reflectToAttribute: true, 18 reflectToAttribute: true,
23 value: false, 19 value: false,
24 observer: '_buttonStateChanged' 20 observer: '_calculateElevation'
25 }
26
27 },
28
29 ready: function() {
30 if (!this.hasAttribute('role')) {
31 this.setAttribute('role', 'button');
32 } 21 }
33 }, 22 },
34 23
35 _buttonStateChanged: function() { 24 _calculateElevation: function() {
36 this._calculateElevation(); 25 if (!this.raised) {
26 this._elevation = 0;
27 } else {
28 Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this);
29 }
30 },
31
32 _computeContentClass: function(receivedFocusFromKeyboard) {
33 var className = 'content ';
34 if (receivedFocusFromKeyboard) {
35 className += ' keyboard-focus';
36 }
37 return className;
37 } 38 }
38
39 }); 39 });
40 40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698