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

Shape and color issues #8

Open
plasticfist opened this issue Apr 15, 2021 · 5 comments
Open

Shape and color issues #8

plasticfist opened this issue Apr 15, 2021 · 5 comments

Comments

@plasticfist
Copy link

First, thank you for this, it looks like there are some style features that this (or the libraries it uses) fails to render as expected. Is there a supported style reference list? If there is I would evaluate changing my styles in order to get a good svg output.

I was surprised both by what it renders well, and just as surprised by the rest.

Here is an example cytoscape.js view
image

and the svg output
image

@plasticfist
Copy link
Author

after several hours of trial and error, I can verify some styles that are problematic and need to be avoided...

  • most of the rounded shapes, aka "shape" : "round-octagon", round-pentagon, barrel, etc
  • the most problematic styling with a side effect, is if you use the edge style "edge-text-rotation": "autorotate", while it DOES rotate the edge labels (see above) it also blacks out all the shapes...

@kinimesi
Copy link
Owner

kinimesi commented Dec 5, 2021

Hi @plasticfist, the second problem you mentioned should be resolved in the unstable branch. Please see relevant issue #7

The problem related to the shapes occurs with all rounded shapes. In the generated SVG, somehow the shape itself and its rounded corners are rotated and they don't align correctly. It needs further investigation.

@KonradHoeffner
Copy link

@kinimesi: I am using cytoscape-svg from npm where it is still only available as version 0.3.1, could you deploy the fixed version on npm?

@kinimesi
Copy link
Owner

I just published 0.4.0, try it out and let me know if it works, thanks.

@KonradHoeffner
Copy link

Yes it works perfectly, thanks!

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

3 participants