Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG partials may fail without width="" height"" set in <svg #60

Open
roblabs opened this issue Jun 26, 2019 · 2 comments
Open

SVG partials may fail without width="" height"" set in <svg #60

roblabs opened this issue Jun 26, 2019 · 2 comments
Labels
documention Issues outlining Gotcha/work arounds/etc.. that need to go into the wiki

Comments

@roblabs
Copy link
Collaborator

roblabs commented Jun 26, 2019

SVG Partials require that width="" height"" are set.

file under workaround, atlante fix may require SVG linting.

Another alternate to linting is to open the SVG Partial in Firefox and verify if the SVG data is too large. If it's too large, then add width="" height"".

Example

An SVG viewbox=0 0 200 100 but no width/height, will have weird side effects. Workaround would be to add width="200" height"100" in order for atlante to do SVG partial layouts.

@roblabs
Copy link
Collaborator Author

roblabs commented Jun 26, 2019

See this related example of the effect when width & height attributes are missing —

nationalparkservice/symbol-library#142

@roblabs
Copy link
Collaborator Author

roblabs commented Jun 29, 2019

Process for laying out partials

  1. open raw SVG make note of the viewbox, and ensure there is a width="" height="" in the <svg tag
  2. Open the SVG in Gimp with resolution set to 72 points, so that reading off x,y coordinates are the same units as SVG.
  3. In Gimp, hover over the upper-left corner of the partial SVG, note those values and insert into the template such as this. The x,y coordinates come from Gimp.
<use x="145"  y="100"  xlink:href="assets/partial1.svg#Layer_1"
     width="145" height="100"
/>

@gdey gdey added the documention Issues outlining Gotcha/work arounds/etc.. that need to go into the wiki label Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documention Issues outlining Gotcha/work arounds/etc.. that need to go into the wiki
Projects
None yet
Development

No branches or pull requests

2 participants