rcarcasses / vue-cytoscape

cytoscape.js now inside vue.js
https://rcarcasses.github.io/vue-cytoscape
MIT License
96 stars 34 forks source link

Layout Extensions #4

Closed m-wrzr closed 5 years ago

m-wrzr commented 5 years ago

Hey, thanks for this library!

I have a question regarding cytoscape layout extensions: is it possible to use them directly within vue-cytoscape? And if so how? The recommended import as described in e.g. https://github.com/cytoscape/cytoscape.js-cola doesn't work for me.

Sry, relatively new to Vue/Javascript in general..

rcarcasses commented 5 years ago

Hey @m-wrzr, I just created a sample project with your desired configuration. Basically to use cytoscape plugins you have to hook into the lifecycle methods preConfig and afterCreated. Take a look here:

https://github.com/rcarcasses/vue-cytoscape-cola

Enjoy!

m-wrzr commented 5 years ago

Thank you so much!!

Created a PR to integrate this example into the main repo #5

rcarcasses commented 5 years ago

Well done, thank you!