Snap.svg icon indicating copy to clipboard operation
Snap.svg copied to clipboard

Using % for gradient stop generates offset as NaN%.

Open doomsbuster opened this issue 12 years ago • 2 comments

If you create a gradient using percentage values for offsets(stops), Snap SVG does not generate the correct gradient definition. Using non percentage based values works. The documentation on the API Docs page demonstrates using percentage values. If it accepts numbers, then per SVG spec it should range between 0 and 1. Below is the Gist with sample outputs: https://gist.github.com/doomsbuster/8208506

Documentation on project site: https://www.evernote.com/shard/s43/sh/74f784fc-b901-46f4-8a2f-a002d7b50bfd/b7472fb11ee1f25916af0e5b3dd98078

doomsbuster avatar Jan 01 '14 14:01 doomsbuster

Thanks Dmitry, I had the same change ready. Just didn't get time to submit a pull request :-)

doomsbuster avatar Jan 03 '14 01:01 doomsbuster

No worries. :)

DmitryBaranovskiy avatar Jan 03 '14 01:01 DmitryBaranovskiy