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

Improve Touch events support #5209

Closed
wants to merge 2 commits into from
Closed

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 18, 2023

Description

This PR improves the touch events support in the tsParticles library. It addresses the issues with multitouch and tap detection, providing a more robust and accurate touch interaction experience.

Summary of Changes

  • Updated the '_touchStart' function to track each touch event individually using its identifier.
  • Updated the '_touchEnd' function to calculate the duration of touch events and determine tap, long tap, or movement.
  • Updated the '_mouseTouchMove' function to handle multiple simultaneous touch events.
  • Added a new function '_handleMultiTouch' to handle multitouch events.
  • Updated the '_mouseTouchClick' and '_mouseTouchFinish' functions to use the new '_handleMultiTouch' function.

Please review and merge this PR to improve the touch events support in tsParticles.

Fixes #4965.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Sep 18, 2023
@sweep-ai sweep-ai bot mentioned this pull request Sep 18, 2023
1 task
@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 18, 2023

GitHub actions yielded the following error.

The command that failed is tsparticles-engine@2.12.0 build:ci /home/runner/work/tsparticles/tsparticles/engine. Here are the relevant lines from the logs:

SyntaxError: Declaration or statement expected. (1:1)
> private readonly _touchStart: (e: Event) => void = (e) => ***
Error: Build failed
at Command.<anonymous> (/home/runner/work/tsparticles/tsparticles/node_modules/�[4m.pnpm�[24m/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/�[4m@tsparticles�[24m/cli/dist/build/build.js:59:15)

Please note that some parts of the logs have been replaced with *** for privacy reasons.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 18, 2023

GitHub actions yielded the following error.

The command that failed is tsparticles-engine@2.12.0 build:ci /home/runner/work/tsparticles/tsparticles/engine. Here are the relevant lines from the logs:

SyntaxError: Declaration or statement expected. (1:1)
> private readonly _touchStart: (e: Event) => void = (e) => ***
Error: Build failed
at Command.<anonymous> (/home/runner/work/tsparticles/tsparticles/node_modules/�[4m.pnpm�[24m/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/�[4m@tsparticles�[24m/cli/dist/build/build.js:59:15)

Please note that some parts of the logs have been replaced with *** for privacy reasons.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@matteobruni matteobruni deleted the sweep/improve-touch-events branch December 26, 2023 12:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/XL sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Touch events support
1 participant