Closed robpvn closed 9 years ago
I decided to go over to using only SVGs, so there's no need for PNG generation (this I decided after having implemented it of course). That will mean that the toggle button will stop working in IE8, but that browser isn't supported anymore from what I know. Technically this will be a breaking change, so to stick to semver the version number will be bumped to 2.0! :birthday:
All done, hurray for SVG!
Hi @robpvn : just a question about performances, using an svg make a hit of 7 833 bits instead of 219 bits for the png. Maybe it would be better to use two differents png image for normal and retina display (as done in leaflet core). Any thoughts about it ?
@robpvn any thoughts about my last comment ?
Sorry, I guess I forgot to answer! Well, the reason is because you can set what size the icon is supposed to be in code. See the "different_minimised" example to see it in action.
The SVG is minimised to 1720 bytes in the dist version though, so it isn't as bad as the source file.
@robpvn no problem, i know what's the point of using svg ;) Sorry but i've missed the point that the file is "only" 1720 bytes in dist folder (it's "just" nearly 8 times bigger than the png).
Well, I like SVGs because they scale cleanly through all possible desired sizes (the diagonal edges mean PNGs won't scale as nicely), and I don't think the extra hit is that much of a problem. If you can find a solution where we can both have our pie and eat it I'm open to suggestions, but I don't like having lots of different icon files for different sizes.
It' ok for me like that :) The ideal solution would be to use a classic png and a -2x.png + an option to use the svg all the time, but this force us to use 3 different size...
We want to solve issues #56 and #73, and we'll do it like this: