dash-cytoscape icon indicating copy to clipboard operation
dash-cytoscape copied to clipboard

Allow user to obtain mouse coordinates

Open JohannesWiesner opened this issue 3 years ago • 2 comments

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

JohannesWiesner avatar Nov 07 '21 22:11 JohannesWiesner

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

Hi @JohannesWiesner , have you discovered some way how to get this position? I'm facing the same problem..

pitris90 avatar Mar 15 '23 18:03 pitris90

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

JohannesWiesner avatar Mar 16 '23 14:03 JohannesWiesner