cytoscape-svg icon indicating copy to clipboard operation
cytoscape-svg copied to clipboard

Shape and color issues

Open plasticfist opened this issue 3 years ago • 6 comments

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 avatar Apr 15 '21 18:04 plasticfist

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...

plasticfist avatar Apr 22 '21 18:04 plasticfist

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.

kinimesi avatar Dec 05 '21 09:12 kinimesi

@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?

KonradHoeffner avatar Apr 13 '22 13:04 KonradHoeffner

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

kinimesi avatar May 25 '22 05:05 kinimesi

Yes it works perfectly, thanks!

KonradHoeffner avatar May 25 '22 06:05 KonradHoeffner

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.

@kinimesi i still have the problem with the rounded corners. Any updates on this topic?

feichin-noreja avatar Sep 04 '24 11:09 feichin-noreja