Skip to content

Commit

Permalink
fix(GarageIcon): correct size
Browse files Browse the repository at this point in the history
Going through all other icons to see which had a  viewbox that matched the width + height  and found only two: icon-garage and icon-up-right-arrow. icon-up-right-arrow had sizing explicitly set in CSS and was not affected. icon-garage defaulted to the leaflet default marker size of 12x12. This explicitly sets the iconSize to 21x25, matching what is specified in the SVG. I noticed that the width and height SVG properties are being removed as part of [svg-inline-loader](https://github.com/webpack-contrib/svg-inline-loader/tree/4bb5529fbdd847d7809067fe11840b48ee13dde4#removesvgtagattrs-boolean). I thought about turning off that behavior as part of this PR, but it seems like it could affect more icons and I'm not really sure if it is necessary
  • Loading branch information
KaylaBrady committed Jan 24, 2023
1 parent 212519f commit 4c37a32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/src/components/mapMarkers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ const garageLeafletIcon = Leaflet.divIcon({
html: garageIcon,
className: "m-garage-icon",
iconAnchor: new Leaflet.Point(10, 25),
iconSize: [21, 25],
})

const Garage = ({
Expand Down

0 comments on commit 4c37a32

Please sign in to comment.