cytoscape.js-cose-bilkent icon indicating copy to clipboard operation
cytoscape.js-cose-bilkent copied to clipboard

Uncaught TypeError: ani.play is not a function

Open rmant opened this issue 3 years ago • 3 comments

Hi,

When I try to use the cose-bilkent layout, I get the following error: Uncaught TypeError: ani.play is not a function at cytoscape.cjs.js:11449 at Array.forEach (<anonymous>) at Collection.layoutPositions (cytoscape.cjs.js:11448) at Layout._CoSELayout.run (cytoscape-cose-bilkent.js:349) at new AppComponent (app.js:36) at $ (preact.module.js:1) at m (preact.module.js:1) at $ (preact.module.js:1) at O (preact.module.js:1) at Module../src/client/index.js (index.js:18)

I'm using:

  • Cytoscape 3.17.1
  • cose-base 1.0.3
  • cytoscape-cose-bilkent 4.1.0

And I'm using cose-bilkent the following way: const layout = cy.layout({ name: 'cose-bilkent', }); layout.run();

rmant avatar Dec 29 '20 14:12 rmant

@rmant I cannot reproduce it in the demo. Can you provide a JSFiddle or JSBin demo to reproduce this issue? Thanks.

hasanbalci avatar Dec 29 '20 23:12 hasanbalci

I can't share my code to reproduce this issue since I'm working with NDA data, but you should be able to reproduce it using the wine and cheese demo, and changing the layout to cose-bilkent or FCoSE

rmant avatar Jan 04 '21 17:01 rmant

I also encountered this error when trying to compute a layout in nodejs, presumably because animation requires DOM manipulation that is only possible in the browser.

My solution was to disable animations (cy.layout({ name: 'cose-bilkent', animate: false })). I don't know if this is applicable to your situation.

jamesscottbrown avatar Jan 19 '22 15:01 jamesscottbrown