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

fix(convertPathData): preserve vertex for markers only path #1967

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

SethFalco
Copy link
Member

If we get a markers only path, for example:

<path marker-start="url(#a)" marker-end="url(#b)" d="M5 5h0"/>

(The path only serves to draw the referenced markers.)

We ensure it always has an extra vertex if it had multiple vertices before optimization. If it did not have multiple vertices, for example it was M/m commands only, then it has the same behavior as before.

See my comment on the related issue for more info:

In short, clients consistently render the marker only when a command other than M or m are used in the path data. If this is removed, in some clients the markers are no longer rendered.

It's unclear from the spec what the intended behavior is, but across all clients, rendering is impacted when no additional vertices are in the path.

Related

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

Successfully merging this pull request may close these issues.

convertPathData removs h0 in pathdata leading to not rending marker-start="url(#a)" in chromium
1 participant