Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to get the cursor position within the canvas? #277

Open
TristanJordan99 opened this issue Sep 29, 2021 · 1 comment
Open
Labels
question Further information is requested

Comments

@TristanJordan99
Copy link

I'm looking for a way to retrieve the mouse position within the canvas in a similar manner to ipycanvas' command:

def handle_mouse_move(x, y):
    # Do something
    pass

canvas.on_mouse_move(handle_mouse_move)
@TristanJordan99 TristanJordan99 added the question Further information is requested label Sep 29, 2021
@ianhi
Copy link
Collaborator

ianhi commented Nov 27, 2021

I don't see a way to do this via https://js.cytoscape.org/#core/events but I would be happy to be wrong. Otherwise I think we need to find a way to grab the underlying canvas object and add our own event hooks to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants