I'm trying the latest cytoscape with the latest cola and I get the following error:
Uncaught TypeError: cola.adaptor is not a function
for the cytoscape.js code snippet:
var adaptor = layout.adaptor = cola.adaptor({
trigger: function( e ){ // on sim event
switch( e.type ){
case 'tick':
if( options.animate ){
Did the API change for Cola?
I still get this error when trying to do as the docs suggest (React/Browserify/ES6/npm):
import cytoscape from 'cytoscape';
import cycola from 'cytoscape-cola';
import cola from 'webcola';
cycola(cytoscape, cola);
However I was able to make it work after seeing this issue and including the cola
v3 script in the <head>
of my index file.
Finally, I had to do this:
cycola(cytoscape, window.cola); // since cola now lives in window
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With