OLD | NEW |
1 <!-- | 1 <!-- |
2 @license | 2 @license |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
9 --> | 9 --> |
10 | 10 |
11 <link rel="import" href="../polymer/polymer.html"> | 11 <link rel="import" href="../polymer/polymer.html"> |
12 <link rel="import" href="../iron-meta/iron-meta.html"> | 12 <link rel="import" href="../iron-meta/iron-meta.html"> |
13 | 13 |
14 <script> | 14 <script> |
15 /** | 15 /** |
16 * The `iron-iconset-svg` element allows users to define their own icon sets | 16 * The `iron-iconset-svg` element allows users to define their own icon sets |
17 * that contain svg icons. The svg icon elements should be children of the | 17 * that contain svg icons. The svg icon elements should be children of the |
18 * `iron-iconset-svg` element. Multiple icons should be given distinct id's. | 18 * `iron-iconset-svg` element. Multiple icons should be given distinct id's. |
19 * | 19 * |
20 * Using svg elements to create icons has a few advantages over traditional | 20 * Using svg elements to create icons has a few advantages over traditional |
21 * bitmap graphics like jpg or png. Icons that use svg are vector based so the
y | 21 * bitmap graphics like jpg or png. Icons that use svg are vector based so the
y |
22 * are resolution independent and should look good on any device. They are | 22 * are resolution independent and should look good on any device. They are |
23 * stylable via css. Icons can be themed, colorized, and even animated. | 23 * stylable via css. Icons can be themed, colorized, and even animated. |
24 * | 24 * |
25 * Example: | 25 * Example: |
26 * | 26 * |
27 * <iron-iconset-svg id="my-svg-icons" iconSize="24"> | 27 * <iron-iconset-svg name="my-svg-icons" size="24"> |
28 * <svg> | 28 * <svg> |
29 * <defs> | 29 * <defs> |
30 * <g id="shape"> | 30 * <g id="shape"> |
31 * <rect x="50" y="50" width="50" height="50" /> | 31 * <rect x="50" y="50" width="50" height="50" /> |
32 * <circle cx="50" cy="50" r="50" /> | 32 * <circle cx="50" cy="50" r="50" /> |
33 * </g> | 33 * </g> |
34 * </defs> | 34 * </defs> |
35 * </svg> | 35 * </svg> |
36 * </iron-iconset-svg> | 36 * </iron-iconset-svg> |
37 * | 37 * |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a
shadow-root | 183 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a
shadow-root |
184 svg.style.cssText = 'pointer-events: none; display: block; width: 100%;
height: 100%;'; | 184 svg.style.cssText = 'pointer-events: none; display: block; width: 100%;
height: 100%;'; |
185 svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id'); | 185 svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id'); |
186 return svg; | 186 return svg; |
187 } | 187 } |
188 return null; | 188 return null; |
189 } | 189 } |
190 | 190 |
191 }); | 191 }); |
192 </script> | 192 </script> |
OLD | NEW |