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

Add support for merged paths (M..Z M..Z M..Z) #9

Open
peteruithoven opened this issue Jul 29, 2014 · 13 comments
Open

Add support for merged paths (M..Z M..Z M..Z) #9

peteruithoven opened this issue Jul 29, 2014 · 13 comments

Comments

@peteruithoven
Copy link
Collaborator

No description provided.

@wout
Copy link
Member

wout commented Jul 29, 2014

Any questions?
:)

@peteruithoven
Copy link
Collaborator Author

No... I'm just used to using issues as todo's ;)

@wout
Copy link
Member

wout commented Jul 29, 2014

LOL :)

@wout
Copy link
Member

wout commented Jul 30, 2014

Quick question, how about you becoming a collaborator on this plugin? That way you don't have to send out pull requests every time.

@peteruithoven
Copy link
Collaborator Author

That would be nice :)

@wout
Copy link
Member

wout commented Jul 30, 2014

Done!
:)

@wout
Copy link
Member

wout commented Aug 1, 2014

Just wondering, how would you solve this? I was thinking that in case of more than one path, a group is created wrapping the individual polygon / polyline elements. That way the converted shape can be moved as a whole.

@peteruithoven
Copy link
Collaborator Author

Interesting issue, mainly what to return is tricky right?
I was thinking of using an array or svg.js set. But when your editing I agree that it would be nice to have these formally merged paths grouped.
Your solution will also work nicely with the ungroup plugin I hope to write.
It will require a warning in the docs anyway I think (that it can also return a group reference).

@wout
Copy link
Member

wout commented Aug 1, 2014

An instance of SVG.Set would also work. Although, calling move() on a set will move all parts to the given x and y by their upper left corner. So in that case a group provides more expected behaviour when manipulating afterwards.

About the ungroup plugin, I would accept this feature to the core. Maybe a good one to add to the list of rc.11 when the new matrix transformations are implemented in rc.10.

@peteruithoven
Copy link
Collaborator Author

Nice, I've been reading the references readme already.

@wout
Copy link
Member

wout commented Aug 1, 2014

Great :)
Just a tip, if you clone the reference branch and run gulp docs, the REAME will be converted to the more readable documentup layout.

@afocus
Copy link

afocus commented Aug 20, 2017

Are there any progress?
This is a useful feature...

@Fuzzyma
Copy link
Member

Fuzzyma commented Jan 21, 2019

Your best approach would be to split your path at M commands and convert them to polygons one by one.

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

No branches or pull requests

4 participants