-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(convertPathData): preserve vertex for markers only path (#1967)
- Loading branch information
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Must preserve vertex for markers only path for consistent rendering across clients. | ||
Must not add vertices if markers only path did not have commands other than M/m anyway. | ||
|
||
See: https://github.com/svg/svgo/issues/1493 | ||
|
||
=== | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 9"> | ||
<marker id="a" stroke="red" viewBox="0 0 5 5"> | ||
<circle cx="2" cy="2" r="1"/> | ||
</marker> | ||
<marker id="b" stroke="green" viewBox="0 0 5 5"> | ||
<circle cx="2" cy="2" r="0.5"/> | ||
</marker> | ||
<path marker-start="url(#a)" d="M5 5h0"/> | ||
<path marker-start="url(#b)" d="M5 5"/> | ||
</svg> | ||
|
||
@@@ | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 9"> | ||
<marker id="a" stroke="red" viewBox="0 0 5 5"> | ||
<circle cx="2" cy="2" r="1"/> | ||
</marker> | ||
<marker id="b" stroke="green" viewBox="0 0 5 5"> | ||
<circle cx="2" cy="2" r="0.5"/> | ||
</marker> | ||
<path marker-start="url(#a)" d="M5 5z"/> | ||
<path marker-start="url(#b)" d="M5 5"/> | ||
</svg> |