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

Bad behaviour with 'mergePath' #1217

Closed
JuergenPurtz opened this issue Feb 4, 2020 · 2 comments
Closed

Bad behaviour with 'mergePath' #1217

JuergenPurtz opened this issue Feb 4, 2020 · 2 comments

Comments

@JuergenPurtz
Copy link

JuergenPurtz commented Feb 4, 2020

The two path elements create two arrowheads:

  <defs>
    <marker id="arrowhead_end" markerWidth="10" markerHeight="10" refX="6" refY="3">
      <path d="M 0,0 l 6,3 l -6,3" stroke="black" />
    </marker>
  </defs>
  <path d="M 10,10 h50" stroke="black" marker-end="url(#arrowhead_end)" />
  <path d="M 10,50 h50" stroke="black" marker-end="url(#arrowhead_end)" />

but the optimized version creates only one arrowhead:
<path d="M10 10h50M10 50h50" stroke="#000" marker-end="url(#arrowhead_end)"/>

Everythink works well if --disable=mergePaths is used. Consequence: As long as a path element uses marker-end or marker-start it shall be omitted from the optimized path.

@kylemh
Copy link

kylemh commented Feb 21, 2021

I don't have the same exact issue, but creating a way for mergePaths to be explicitly avoided would be nice. Something like disable comments (like // eslint-disable) or some attribute that can be unique per path.

@TrySound
Copy link
Member

TrySound commented Mar 6, 2021

Fixed in v2.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants