johnnyflinn / ngCytoscape

Angular directive for cytoscape.js
http://johnnyflinn.github.io/ngCytoscape
MIT License
17 stars 18 forks source link

How to register and use the extentions? #24

Open anvial opened 7 years ago

anvial commented 7 years ago

Hello,

I undestand your comment about cola extention. Where we need to use only layout (that is watche by ngCytoscape).

But what about other extentions. For example: https://github.com/cytoscape/cytoscape.js-edgehandles

Where we need access to "cy" object.

Thank You.

johnnyflinn commented 7 years ago

Technically, you have access to cy post initialization of the graph. However, this will not solve your dilemma. It shouldn't be too difficult to implement. We'd need to add an graph-extensions attribute that would take an array of config objects. Something like: [{extension: 'edgehandles', options: {}}] and have the directive register those extensions prior to initialization.

Obviously, this repo is not actively maintained, so I can't guarantee this will be implemented anytime soon. I do merge PRs when submitted.

SanderBreivik commented 4 years ago

Is this something that could be done easily?