Skip to content

Commit

Permalink
Set viewBox attribute on svg
Browse files Browse the repository at this point in the history
Fixes muxlab#2
  • Loading branch information
nrotstan committed Jun 12, 2019
1 parent 34a8919 commit d682909
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions L.VectorIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ L.VectorIcon = L.Icon.extend({
svg.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
svg.setAttribute('height', options.svgHeight + '');
svg.setAttribute('width', options.svgWidth + '');
svg.setAttribute('viewBox', options.viewBox + '');

svg.style.marginTop = (options.svgHeight/2 - 6) * -1 + 'px';
svg.style.marginLeft = (options.svgWidth/2 - 6) * -1 + 'px';
Expand Down

0 comments on commit d682909

Please # to comment.