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

excludeClass - allow elements to be clickable #41

Open
laraduarte opened this issue Jul 18, 2023 · 3 comments
Open

excludeClass - allow elements to be clickable #41

laraduarte opened this issue Jul 18, 2023 · 3 comments

Comments

@laraduarte
Copy link

Can you implement something similar to this feature available in panzoom

"Add class options.excludeClass (default is "panzoom-exclude") to whatever element you want to be clickable. Panzoom will check for this class before handling the event. Alternatively, add a reference to the element to the exclude option, or call event.stopImmediatePropagation() in an event handler on the clickable element."

@worka
Copy link
Owner

worka commented Jul 30, 2023

You can always access the desired element from outside the plugin and perform any action, or use an event.stopImmediatePropagation() as written in your quote. Does this option work for you?

@agletd
Copy link

agletd commented Sep 15, 2023

event.stopImmediatePropagation() is not helping

@worka
Copy link
Owner

worka commented Sep 16, 2023

Most likely because you are listening to the click event, you need to interrupt the mousedown event handler

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

No branches or pull requests

3 participants