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

programmatic access to mouse events #8

Closed
marnec opened this issue Aug 25, 2020 · 2 comments
Closed

programmatic access to mouse events #8

marnec opened this issue Aug 25, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@marnec
Copy link

marnec commented Aug 25, 2020

Hi,
I searched in docs and examples but it seems that the API offers no way to access mouse events happening in the canvas.

I would like to prevent some default click behavior (e.g. focusing on right-clicked residues) and add some custom behaviors.

While I can catch clicks happening on the canvas it is very difficult (or impossible) to know where the click happened (residue or background) and to prevent default behavior.

Is this possible with the current API? Do you plan to add some or any of these functionalities? Alternatively, do you know of any workaround that could help me?

@mandarsd
Copy link
Collaborator

Hi,
Please refer to 'Custom Events' section here in the wiki docs. You can add listener for Click (Primary), Mouseover and Mouseout events.
Currently there is no provision to prevent / override default mouse event behaviour. I'll add this to our feature request list and check how we can provide this functionality generically using parameters.
As a workaround for now, you could fork the code and override the defaults. Here is a reference

@mandarsd mandarsd added the enhancement New feature or request label Aug 26, 2020
@mandarsd
Copy link
Collaborator

Hi,
The plugin v1.2.0 provides parameters to override mouse click behaviour. For details please refer selectBindings and focusBindings parameters in the plugin documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants