newsdev / ai2html

A script for Adobe Illustrator that converts your Illustrator artwork into an html page.
http://ai2html.org
Other
898 stars 146 forks source link

mapshaper-made SVG in Illustrator has paths disappear in ai2html output (when opacity not 100%?) #126

Open cedricsam opened 4 years ago

cedricsam commented 4 years ago

So I had this use case where I generated an SVG in mapshaper using (important thing is the 50% opacity):

...
-style stroke-width=.3 stroke-dasharray='1 2' stroke='#fff' stroke-width=.6 fill='#fff' opacity='.5' target=kashmir
...

And put it in Illustrator, did stuff that didn't modify the individual paths of the "kashmir" group and exported using these ai2html settings:

image_format: svg
inline_svg: true

Problem I had was that the paths in the kashmir group are now gone from the output. And I changed around the order, played with the group's style. It affected scripts 0.85.0 and 0.97.0, but kashmir exported fine in 0.66.4 (which did not have inline_svg though).

Screen Shot 2019-12-10 at 14 28 20

It's only later that I found I had these gray dots next to my paths that meant the opacity was individually tweaked.

Screen Shot 2019-12-10 at 14 26 47

Not sure if it's the opacity or any style on path that caused the problem... but anyway, just reporting it, in case it's something!

cedricsam commented 4 years ago

When I revert the opacity to default/100% in Illustrator, the paths would be exported fine again. (Did not try to see if it was a mapshaper-specific/SVG import thing and didn't re-export from mapshaper.)