Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Properly adapt to icon scale
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed May 30, 2014
1 parent f78f502 commit 6230dd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core-iconset-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
* applied.
* @param {String|Number} icon The name the icon to apply.
*/
applyIcon: function(element, icon) {
applyIcon: function(element, icon, scale) {
var root = element.shadowRoot || element;
// remove old
var old = root.querySelector('svg');
Expand All @@ -119,7 +119,7 @@
if (!svg) {
return;
}
svg.style.height = svg.style.width = this.iconSize + 'px';
svg.style.height = svg.style.width = (scale * this.iconSize) + 'px';
svg.style.verticalAlign = 'middle';
if (svg) {
root.insertBefore(svg, root.firstElementChild);
Expand Down

0 comments on commit 6230dd0

Please sign in to comment.