Fix Group2d getSvgPathData()
missing move markers
#5580
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently for the
Group2d.getSvgPathData()
method it will take into account the index for the children to determine which is the first when generating SVG paths. I believe this is incorrect because each child as a group should be isolated and not connected. This removes that index check and treats each child as the beginning for when generating SVG data.Testing
I tested this in a project using 1)
Polyline2d
followed by 2)CubicBezier2d
both added to aGroup2d
(the cubic bezier curve being added last). You can see in the below screenshot that the end of the poly line (on the left side) is being connected to the cubic bezier.In the fixed version the cubic bezier is correctly not connecting to the poly line.
Before
After
Change type
bugfix
improvement
feature
api
other
Test plan
getSvgPathData()
methodRelease notes
Group2D.getSvgPathData()
so that children in the resulting SVG have their starting points defined correctly.