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

Commit

Permalink
set aspect preserveAspectRatio when not explicitly sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jun 13, 2014
1 parent c431dc1 commit 91d0736
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core-iconset-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@
var size = scale * this.iconSize;
if (size) {
svg.style.height = svg.style.width = size + 'px';
} else {
svg.setAttribute('height', '100%');
svg.setAttribute('width', '100%');
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
}
svg.style.display = 'block';
root.insertBefore(svg, root.firstElementChild);
Expand Down

0 comments on commit 91d0736

Please sign in to comment.