OLD | NEW |
1 Polymer({ | 1 Polymer({ |
2 | 2 |
3 is: 'paper-card', | 3 is: 'paper-card', |
4 | 4 |
5 properties: { | 5 properties: { |
6 | 6 |
7 /** | 7 /** |
8 * The title of the card. | 8 * The title of the card. |
9 */ | 9 */ |
10 heading: { | 10 heading: { |
11 type: String, | 11 type: String, |
12 value: '', | 12 value: '', |
13 observer: '_headingChanged' | 13 observer: '_headingChanged' |
14 }, | 14 }, |
15 | 15 |
16 /** | 16 /** |
17 * The url of the title image of the card. | 17 * The url of the title image of the card. |
18 */ | 18 */ |
19 image: { | 19 image: { |
20 type: String, | 20 type: String, |
21 value: '' | 21 value: '' |
22 }, | 22 }, |
23 | 23 |
24 /** | 24 /** |
| 25 * When `true`, any change to the image url property will cause the |
| 26 * `placeholder` image to be shown until the image is fully rendered. |
| 27 */ |
| 28 preloadImage: { |
| 29 type: Boolean, |
| 30 value: false |
| 31 }, |
| 32 |
| 33 /** |
| 34 * When `preloadImage` is true, setting `fadeImage` to true will cause the |
| 35 * image to fade into place. |
| 36 */ |
| 37 fadeImage: { |
| 38 type: Boolean, |
| 39 value: false |
| 40 }, |
| 41 |
| 42 /** |
25 * The z-depth of the card, from 0-5. | 43 * The z-depth of the card, from 0-5. |
26 */ | 44 */ |
27 elevation: { | 45 elevation: { |
28 type: Number, | 46 type: Number, |
29 value: 1, | 47 value: 1, |
30 reflectToAttribute: true | 48 reflectToAttribute: true |
31 }, | 49 }, |
32 | 50 |
33 /** | 51 /** |
34 * Set this to true to animate the card shadow when setting a new | 52 * Set this to true to animate the card shadow when setting a new |
(...skipping 25 matching lines...) Expand all Loading... |
60 var cls = 'title-text'; | 78 var cls = 'title-text'; |
61 if (image) | 79 if (image) |
62 cls += ' over-image'; | 80 cls += ' over-image'; |
63 return cls; | 81 return cls; |
64 }, | 82 }, |
65 | 83 |
66 _computeAnimated: function(animatedShadow) { | 84 _computeAnimated: function(animatedShadow) { |
67 return animatedShadow; | 85 return animatedShadow; |
68 } | 86 } |
69 }); | 87 }); |
OLD | NEW |