Closed tbow closed 9 years ago
After some more research it seems that the second image is always the one getting "swapped"
This is a problem for me as well, ideally the output of the sprite would be in alphabetical order.
This behavior is definitely not intentional. Sorting must've dropped out during refactoring a while back. Hmm.
It should be easy to fix though - give me a sec. :)
Ok - I've added a sort on the sprite items before building the actual sprite.
The change is in dr-svg-sprites (version 0.9.16) and not the grunt wrapper - so you'll probably need to run npm cache clean
and install!
:(
Still not working correctly. I did npm cache clean
then a npm update
to get the latest.
ugh I didn't test with filenames consisting of not just numbers...
Try updating again (version 0.9.18).
Updated but sorry, no dice. :( I tried both numbered and alpha names for the svg files and they both are still out of order as long as there are more than 10 files in the source directory.
This thing had me pulling my hair out... The sorting routine I had added was working - but the external module the builder uses to do the actual layout reshuffled items around!?
Luckily that module had an option to omit shuffling ;)
Updated to version 0.9.19.
Fixed. Works great now! Thanks for your work on this, great plugin. This saves my team a great amount of time!
@tbow NP! And thanks for the heads-up :)
I'll also throw my thanks into the ring, I haven't tried it yet but this will be super helpful ;)
When creating sprites using over ten images, the file name order is not respected when creating the sprites/CSS. I am naming my files 001_image.svg, 002_image.svg, etc. As long as source image number is 10 or less the order is respected. This was a test run, I know that class names can't begin with numbers :)