| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 created: function() { | 69 created: function() { |
| 70 this._icons = {}; | 70 this._icons = {}; |
| 71 }, | 71 }, |
| 72 | 72 |
| 73 ready: function() { | 73 ready: function() { |
| 74 this.super(); | 74 this.super(); |
| 75 this.updateIcons(); | 75 this.updateIcons(); |
| 76 }, | 76 }, |
| 77 | 77 |
| 78 iconById: function(id) { | 78 iconById: function(id) { |
| 79 return this._icons[id] || (this._icons[id] = this.querySelector('#' + id
)); | 79 return this._icons[id] || (this._icons[id] = this.querySelector('[id="'
+ id +'"]')); |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 cloneIcon: function(id) { | 82 cloneIcon: function(id) { |
| 83 var icon = this.iconById(id); | 83 var icon = this.iconById(id); |
| 84 if (icon) { | 84 if (icon) { |
| 85 var content = icon.cloneNode(true); | 85 var content = icon.cloneNode(true); |
| 86 content.removeAttribute('id'); | 86 content.removeAttribute('id'); |
| 87 var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'
); | 87 var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'
); |
| 88 svg.setAttribute('viewBox', '0 0 ' + this.iconSize + ' ' + | 88 svg.setAttribute('viewBox', '0 0 ' + this.iconSize + ' ' + |
| 89 this.iconSize); | 89 this.iconSize); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 | 163 |
| 164 }); | 164 }); |
| 165 | 165 |
| 166 </script> | 166 </script> |
| 167 | 167 |
| 168 </polymer-element> | 168 </polymer-element> |
| OLD | NEW |