| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 Polymer({ | 3 Polymer({ |
| 4 | 4 |
| 5 is: 'iron-iconset', | 5 is: 'iron-iconset', |
| 6 | 6 |
| 7 properties: { | 7 properties: { |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The URL of the iconset image. | 10 * The URL of the iconset image. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 /** | 119 /** |
| 120 * Applies an icon to the given element as a css background image. This | 120 * Applies an icon to the given element as a css background image. This |
| 121 * method does not size the element, and it's usually necessary to set | 121 * method does not size the element, and it's usually necessary to set |
| 122 * the element's height and width so that the background image is visible. | 122 * the element's height and width so that the background image is visible. |
| 123 * | 123 * |
| 124 * @method applyIcon | 124 * @method applyIcon |
| 125 * @param {Element} element The element to which the icon is applied. | 125 * @param {Element} element The element to which the icon is applied. |
| 126 * @param {String|Number} icon The name or index of the icon to apply. | 126 * @param {String|Number} icon The name or index of the icon to apply. |
| 127 * @param {String} theme (optional) The name or index of the icon to apply. | 127 * @param {String} theme (optional) The name or index of the icon to apply. |
| 128 * @param {Number} scale (optional, defaults to 1) Icon scaling factor. | 128 * @param {Number} scale (optional, defaults to 1) Icon scaling factor. |
| 129 * @return {Element} The applied icon element. | |
| 130 */ | 129 */ |
| 131 applyIcon: function(element, icon, theme, scale) { | 130 applyIcon: function(element, icon, theme, scale) { |
| 132 this._validateIconMap(); | 131 this._validateIconMap(); |
| 133 var offset = this._getThemedOffset(icon, theme); | 132 var offset = this._getThemedOffset(icon, theme); |
| 134 if (element && offset) { | 133 if (element && offset) { |
| 135 this._addIconStyles(element, this._srcUrl, offset, scale || 1, | 134 this._addIconStyles(element, this._srcUrl, offset, scale || 1, |
| 136 this.size, this.width); | 135 this.size, this.width); |
| 137 } | 136 } |
| 138 }, | 137 }, |
| 139 | 138 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 style.height = size + 'px'; | 267 style.height = size + 'px'; |
| 269 element.setAttribute('role', 'img'); | 268 element.setAttribute('role', 'img'); |
| 270 }, | 269 }, |
| 271 | 270 |
| 272 _removeIconStyles: function(style) { | 271 _removeIconStyles: function(style) { |
| 273 style.background = ''; | 272 style.background = ''; |
| 274 } | 273 } |
| 275 | 274 |
| 276 }); | 275 }); |
| 277 | 276 |
| OLD | NEW |