dash-cytoscape
dash-cytoscape copied to clipboard
Allow user to obtain mouse coordinates
It would be nice if it was possible to obtain mouse coordinates from dash_cytoscape.Cytoscape
. In my current project, I would like to create new nodes whenever I click on 'white space' within the cytoscape object. I guess, since mouseoverNodeData
and mouseoverEdgeData
are already available, there must be some code running in the background that gets the current mouse position? I already posted this question on the plotly forum and there's already the same question but for cytoscape.js
It would be nice if it was possible to obtain mouse coordinates from
dash_cytoscape.Cytoscape
. In my current project, I would like to create new nodes whenever I click on 'white space' within the cytoscape object. I guess, sincemouseoverNodeData
andmouseoverEdgeData
are already available, there must be some code running in the background that gets the current mouse position? I already posted this question on the plotly forum and there's already the same question but for cytoscape.js
Hi @JohannesWiesner , have you discovered some way how to get this position? I'm facing the same problem..
Hi! No, I haven't found a way yet, although admittedly I've never delved deeper into the code. There must be some way to use do this as dash-cytoscape is just a python wrapper around cytoscape.js. I guess this link could somehow point in the right direction