Apply layout for nodes

19 views
Skip to first unread message

Alexey

unread,
Aug 20, 2020, 2:50:27 AM8/20/20
to cytoscape-app-dev
Hello! I have a method that adds new nodes and edges to the current network and I want to place these nodes in some way (set coordinates X,Y). I have a Set <CyNodes> newNodes in which I store the nodes that my method adds and I need to get a View <CyNode> from each node. How can I do that? Thanks in advance for your help!
P.S. I don't need to create a new CustomLayout or something like that, I need to work in exactly the same method where I add new nodes.

Scooter Morris

unread,
Aug 20, 2020, 10:44:51 AM8/20/20
to cytoscape-app-dev
Hi Alexey,
     If you have the CyNetworkView, you can get the View<CyNode> by calling getNodeView(node).  Alternatively, you can get all of the node views by calling getAllNodeViews().

-- scooter
Reply all
Reply to author
Forward
0 new messages