L2jLiga / xd2svg

Utility for converting Adobe eXperience Design files into SVG
MIT License
52 stars 7 forks source link

Use Artboard origin for SVGs #62

Open AndrewLeedham opened 5 years ago

AndrewLeedham commented 5 years ago

Expected Behavior

The outputted viewBox and path coordinates to be relative to the Artboard.

Actual Behavior

The outputted viewBox and path coordinates are relative to the whole Document.

Steps to Reproduce the Problem

  1. Create an .xd file with multiple Artboard's
  2. Convert it so SVGs
  3. Compare the output

Demo: https://codesandbox.io/s/k9o047r413 Shows 2 identical artboards outputting different markup.

Specifications

L2jLiga commented 5 years ago

Thanks for the report.

It's normal behaviour, converter use values provided in .xd. I will take a look what can I do. Anyway PRs are welcome!