OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
3 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 3 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
5 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 5 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
6 Code distributed by Google as part of the polymer project is also | 6 Code distributed by Google as part of the polymer project is also |
7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
8 --> | 8 --> |
9 | 9 |
10 <!-- | 10 <!-- |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 * @type string | 86 * @type string |
87 * @default null | 87 * @default null |
88 */ | 88 */ |
89 src: null, | 89 src: null, |
90 | 90 |
91 /** | 91 /** |
92 * When false, the image is prevented from loading and any placeholder is | 92 * When false, the image is prevented from loading and any placeholder is |
93 * shown. This may be useful when a binding to the src property is known
to | 93 * shown. This may be useful when a binding to the src property is known
to |
94 * be invalid, to prevent 404 requests. | 94 * be invalid, to prevent 404 requests. |
95 * | 95 * |
96 * @attribute src | 96 * @attribute load |
97 * @type string | 97 * @type boolean |
98 * @default null | 98 * @default true |
99 */ | 99 */ |
100 load: true, | 100 load: true, |
101 | 101 |
102 /** | 102 /** |
103 * Sets a sizing option for the image. Valid values are `contain` (full | 103 * Sets a sizing option for the image. Valid values are `contain` (full |
104 * aspect ratio of the image is contained within the element and | 104 * aspect ratio of the image is contained within the element and |
105 * letterboxed) or `cover` (image is cropped in order to fully cover the | 105 * letterboxed) or `cover` (image is cropped in order to fully cover the |
106 * bounds of the element), or `null` (default: image takes natural size). | 106 * bounds of the element), or `null` (default: image takes natural size). |
107 * | 107 * |
108 * @attribute sizing | 108 * @attribute sizing |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 this.style.backgroundImage = src ? 'url(' + src + ')': ''; | 234 this.style.backgroundImage = src ? 'url(' + src + ')': ''; |
235 } else { | 235 } else { |
236 this.$.img.src = src || ''; | 236 this.$.img.src = src || ''; |
237 } | 237 } |
238 } | 238 } |
239 | 239 |
240 }); | 240 }); |
241 | 241 |
242 </script> | 242 </script> |
243 </polymer-element> | 243 </polymer-element> |
OLD | NEW |