Skip to content

Can you get access to raw touch events within plugin handlers #378

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

Open
vidhill opened this issue Oct 9, 2023 · 0 comments
Open

Can you get access to raw touch events within plugin handlers #378

vidhill opened this issue Oct 9, 2023 · 0 comments

Comments

@vidhill
Copy link

vidhill commented Oct 9, 2023

I have the need to prevent dragging of a keen slider instance if more there is more than one 'touches' in a TouchEvent

I cannot seem to get access to the 'raw' touch event

I would need to intercept the drag event, in much the same way as was used in this PR: #73

-but without making changes to keen slider core

i.e.

I would like to be able to add a check like this in my plugin

if (
        e.raw instanceof TouchEvent &&
        e.raw.touches.length >= 2
      )
        return dragStop(e)

Is there a way to do this?

Many thanks

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

1 participant