-
Notifications
You must be signed in to change notification settings - Fork 330
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
Convert Vectors to SVG, take 2 #152
Conversation
I've added some changes to how the SVG wrapper works. Now it seems to be positioning elements more reliably. My extreme example with hundreds of deeply nested nodes is still not completely right and i'm not sure what exactly is causing the problem. Probably something to do with nested groups not being positioned inside correctly or in other words, in the case that a group contains SVG objects that are absolutely positioned, and there are subgroups next to them, the subgroups should use position absolute rather than relative. It may also have to do with nested transformations where the rotations are being applied incorrectly. Need to test more. This looks right This is closer but shapes are scattered around incorrectly.UpdateI found the issue. It is related to rotations on / within groups. #155 |
…ps containing only these types will all be compressed into a single SVG.
…es of SVG graphics. Super complicated example still broken. not sure why exactly.
…ctions now just take the whole settings object
@bernaferrari I think this is working pretty well. Did you get a chance to look at it? |
Oh, sorry. Weekend I was traveling and yesterday my flight got delayed by 12h. Will review later today. |
Don't worry! You can do it when you have time. Just curious if you had any feedback. |
Vector feels small compared to everything else that you changed. Good and interesting changes! |
You know the next step is downloading a zip with all the images/svgs, either as a raw html project or nextjs project? I'm waiting for the next PR.. 😝 |
Also, if you want I can take a shot into the AST feature |
@bernaferrari |
There is almost no difference from raw html with zip to nextjs, so you can do whatever you want. |
Hi @bernaferrari
I've done another pass on this. There are probably a few things that should be fixed before merging but I wanted to show you. I'm interested in getting your feedback on this since you have a lot more experience with this than I do.
Here's a summary...
exportAsync()
to flatten the node. It gets stored in the svg prop so it doesn't get run more than once.Known issues:
div
withposition: absolute
Without Text:
With Text: