You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I expand node with cy.layout({name:'cose-bilkent'}), the layout looks good, but the cue sign is wrong. (When expand node, it should show a minus sign not a plus sign )
I'm learning [
cytoscape.js
][1] and its related extension [cytoscape.js-expand-collapse
][2] and being attracted to its amazing features.I tried to do a demo that when open a node, request the child nodes with ajax from server and expand the group.
I find the extension
cytoscape.js-expand-collapse
has a cue utility. When a node has child nodes, it will show a cue sign.In my demo, I don't know the child nodes before expanding it. So I append a dummy node at initial status.
When expand a node, I have to remove the dummy node, request the real child nodes, append to the group and relayout the graph.
How do I to relayout ?
I find two ways. One way is to call
expand
API of the extension, the other way is to callcy.layout()
. Neither method is satisfactory.If I expand node with
expand
method ofcytoscape.js-expand-collapse
, the whole graph will always shift on the sceen or even fly out of the screen.If I expand node with
cy.layout({name:'cose-bilkent'})
, the layout looks good, but the cue sign is wrong. (When expand node, it should show a minus sign not a plus sign )What I need is to combine the advantages! When expand a node, the layout looks good and the cue sign is right.
See my demo.
https://codepen.io/Does666/pen/WPLjQq
You can click the cue signs one by one and then check the top checkbox to see the issue.
The text was updated successfully, but these errors were encountered: