shichuanpo / cytoscape.js-d3-force

d3-force for cytoscape
MIT License
23 stars 9 forks source link

d3-force layout update issue #11

Open atiwari2668 opened 1 year ago

atiwari2668 commented 1 year ago

I have made a graph by using cytoscape.js-d3-force. first time it working fine and plotting graph properly. i want to right click on any node and get new node. after getting this new node i have to add. i did by using cy.add({}) Now i have used cy.layout( name: 'd3-force', animate: true, fixedAfterDragging: true, linkId: function id(d) { return d.id; }, linkDistance: 200, manyBodyStrength: -300, collideRadius: 80,
ready: function(){}, stop: function(){}, tick: function (){}, randomize: false, infinite: true, }).run()
I have used this for refreshing the layout. the blank screen shows. it is not refreshing actually. can anyone help

shaunT0ny commented 1 year ago

Hi there,have you resolved your problem now? I meet similar issue and have no idea

shichuanpo commented 1 year ago

您好!邮件已收到!

atiwari2668 commented 1 year ago

Hi there,have you resolved your problem now? I meet similar issue and have no idea

Yes my issue fixed

atiwari2668 commented 1 year ago

please do some change in your layout config pan: { x: 0, y: 0 }, infinite: false,

Please add this two property and use i hope it will work or also add cy.center()