Multiple Cytoscape.js instance

544 views
Skip to first unread message

Amp

unread,
Oct 9, 2013, 12:34:39 PM10/9/13
to cytoscap...@googlegroups.com
Hi,

We are looking for an implementation where we would be requiring 2 separate instance cytoscape.js on a webpage.
One instance for displaying a static flow and the other one to edit.

We checked this:
1. http://stackoverflow.com/questions/13012939/using-two-graph-panels-in-cytoscape-js
2. https://github.com/cytoscape/cytoscape.js/issues/176

Can we have a sample example, as we are not able to draw 2 graphs with two instances.

cheers,
Amp

Amp

unread,
Oct 10, 2013, 4:56:12 AM10/10/13
to cytoscap...@googlegroups.com
Hi,

We were able to drew 2 cyto instances.

One more question: I see pan/zoom plugin under "https://github.com/cytoscape/cytoscape.js/tree/master/src/plugins", but no clear example on this.
I followed "http://stackoverflow.com/questions/11314718/icons-missing-on-cytoscape-panzoom-plugin", but no success.

Any inputs on this ?
P.S: we are using 2.0.2 version.

Max Franz

unread,
Oct 10, 2013, 11:03:37 AM10/10/13
to cytoscap...@googlegroups.com
The plugins will be reorganised and more documented in 2.1.0.

As for your example:

    var $graph = $('#graph');

    $graph.cytoscape(function(){ // on ready, init elsewhere
      $graph.cytoscapePanzoom({ /* maybe some options here */ }); // init panzoom
    });

-M

--
You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-disc...@googlegroups.com.
To post to this group, send email to cytoscap...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Amp

unread,
Oct 12, 2013, 1:15:28 PM10/12/13
to cytoscap...@googlegroups.com
That worked !!.

Few questions:
1. How to kill or delete the complete instance of cytoscape.js. Do we have any method ?
For example, if we have 10 buttons in the grid and on the click of each I would like to draw a new graph. Currently we are emptying the nodes and edges. But with this once the graph gets loaded, we won't get a right click context menu. Is this is the right way of doing this?

2. On Chrome-30.0 and Firefox-23.0.1, we experience the graph becomes invisible for a while and appears once we click on the browser window.
Is this normal ?
P.S: Note: We have not tested on IE >9 version yet.

3. When we expect "2.1.0" to come out ?


Thanks,
Amp

Max

unread,
Oct 15, 2013, 2:00:21 PM10/15/13
to cytoscap...@googlegroups.com

On Saturday, 12 October, 2013 at 13:15 , Amp wrote:

That worked !!.

Few questions:
1. How to kill or delete the complete instance of cytoscape.js. Do we have any method ?
For example, if we have 10 buttons in the grid and on the click of each I would like to draw a new graph. Currently we are emptying the nodes and edges. But with this once the graph gets loaded, we won't get a right click context menu. Is this is the right way of doing this?
The default browser rightclick action is disabled on every Cy.js instance, but you can bind to `cxttap` etc to create your own UI. 

2. On Chrome-30.0 and Firefox-23.0.1, we experience the graph becomes invisible for a while and appears once we click on the browser window.
Is this normal ?
P.S: Note: We have not tested on IE >9 version yet.

Could you provide a link to an example?  Your live code or a jsbin or similar?
 
3. When we expect "2.1.0" to come out ?

As soon as I have time to work on it after the 2.0.3 bugfix release.

Amp

unread,
Oct 20, 2013, 9:16:50 AM10/20/13
to cytoscap...@googlegroups.com
Thanks max for replying.

We tweaked our existing code and that automatically fixed the issues 1 and 2.
Awaiting for new version.

One important thing, we tried 'arbor' layout to give a shot, but that leads to slowness on IE and FF.



--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-discuss/vpii5J7FVzE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cytoscape-disc...@googlegroups.com.

Max

unread,
Oct 21, 2013, 4:51:01 PM10/21/13
to cytoscap...@googlegroups.com

On Sunday, 20 October, 2013 at 09:16 , Amp wrote:

Thanks max for replying.

We tweaked our existing code and that automatically fixed the issues 1 and 2.
Awaiting for new version.

One important thing, we tried 'arbor' layout to give a shot, but that leads to slowness on IE and FF.

Are webworkers enabled in those instances?  Either way, you can turn off the live preview option, and that should help to make things faster.  Let me know if you run into any other issues. -M
Reply all
Reply to author
Forward
0 new messages