Open marimeireles opened 3 years ago
I was creating some examples to scypy and noticed the events received in this case:
def paint_blue(event): auxNode = cyGraph.graph.nodes[int(event['data']['id'])] auxNode.classes += ' blue' cyGraph.on('node', 'click', paint_blue)
Are a perfect Node instance. I think it'd make sense to convert this event to ipycytoscape.Node() on our backend. That'd remove the need to have this line auxNode = cyGraph.graph.nodes[int(event['data']['id'])]. This also works for Edge.
Node
ipycytoscape.Node()
auxNode = cyGraph.graph.nodes[int(event['data']['id'])]
Edge
I was creating some examples to scypy and noticed the events received in this case:
Are a perfect
Node
instance. I think it'd make sense to convert this event toipycytoscape.Node()
on our backend. That'd remove the need to have this lineauxNode = cyGraph.graph.nodes[int(event['data']['id'])]
. This also works forEdge
.