0

I am trying to use the cola layout in a Cytoscape graph in javascript, but I get the error

Can not apply layout: No such layout `cola` found; did you include its JS file?

I have already included both the cola and cytoscape libraries as well as the adaptor required to use cola in cytoscape in my HTML:

I don't know if there is still something else I am missing or what else I should try to include to be able to use cola!

user13987
  • 3
  • 7

1 Answers1

0

Duplicate of : Including JavaScript files from GitHub into HTML pages

Use a CDN, like Unpkg or CDNJS --- or use a package manager like npm.

maxkfranz
  • 11,896
  • 1
  • 27
  • 36
  • I have not actually included the Javascript as the raw github links. I have copied the code to local files and included local files. I just included the links to show what the .js files were that I am including. – user13987 Dec 19 '17 at 21:47
  • unpkg worked! Thanks! Though I still don't understand why it shouldn't work on copying the code into local files. – user13987 Dec 19 '17 at 23:02