Reputation: 158
I have a very basic cytoscape.js graph with cytoscape-expand-collapse.
There are two nodes with an edge between them. On top of one of those nodes, are two parent compound nodes.
When i collapse both the parents and they try to expand them again, the graph gets stuck(probably in an infinite loop somewhere).
Here is a codepen showing the problem. And the code:
BEWARE: Your browser might get stuck if you try to expand the node.
document.addEventListener('DOMContentLoaded', function(){
var cy = window.cy = cytoscape({
container: document.getElementById('cy'),
ready: function(){
var api = this.expandCollapse({
layoutBy: {
name: "cose-bilkent",
animate: true,
ranker: 'network-simplex',
fit: true,
// nodeDimensionsIncludeLabels: true,
},
fisheye: false,
undoable: false,
});
api.collapseAll();
},
elements: {
"nodes": [{
"data": {
"id": "tea-beverage",
"label": "Tea Beverage",
"parent": "NA-canary"
}
}, {
"data": {
"id": "frontend-hotdrinks",
"label": "FrontEnd Hot Drinks",
"parent": "frontend-canary"
}
}, {
"data": {
"id": "frontend",
"label": "frontend",
}
},{
"data": {
"id": "frontend-canary",
"label": "canary",
"parent": "frontend",
}
}],
"edges": [{
"data": {
"source": "frontend-hotdrinks",
"target": "tea-beverage",
}
}],
}
});
Any help will be appreciated. Thanks.
Upvotes: 2
Views: 668
Reputation: 1065
It works fine with Cytoscape.js version <= 3.3.6
As usual, @maxkfranz keeps breaking backwards compatibility.
You can create a new issue here.
Upvotes: 2