Skip to content
Advertisement

Position only the label of a parent node over the edge to a children node in Cytoscape.js

I am trying to create a compound node in Cytoscape.js with labels and an edge from the child node to another node. If you run the snippet below and move the b north of a, you see that the label of a is below the edge between b and a-1, which I don’t want.

I could set z-compound-depth of a and a-1 to top, but then the edge would not be visible inside of a.

I want to position the edge on top of a, but below the label of a. How can I achieve this?

JavaScript
JavaScript
JavaScript

Advertisement

Answer

I know this does not answer your question. But you ask for something that is not simple and efficient to achieve. If you only need better visualization, applying line-opacity to the edge’s line style is an alternate approach.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement