Closed MichaelWrana closed 6 years ago
I have no idea how to create a non-displayed network using the new CytoscapeService.
The CytoscapeService is only needed for react components. On the server, just create a new Cytoscape()
in the block where it's needed.
That seems to have worked. Thanks!
Refs #861
Background Info
The general idea is to calculate the centrality values for all the nodes on the server rather than the client. In order to do that I need to create a dummy cytoscape network object and utilize
eles.betweennessCentrality()
: http://js.cytoscape.org/#eles.betweennessCentrality. This cytoscape object will only exist in the scope of some function and calculate centrality values for each node. The calculated values will then be passed to the client through the network JSON.Actual Issue
I have no idea how to create a non-displayed network using the new
CytoscapeService
.What I have tried: In
server/graph-generation/interaction/index.js
in theparse
function, inserted the following (line 67-68) :Where
network
is an object that looks like:{ edges: [ ... ] , nodes: [ ... ] }
This gives console error: