Separate onClick event into onMouseDown and onMouseUp events #5210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR separates the
onClick
event in the tsParticles library intoonMouseDown
andonMouseUp
events. This change improves the options for handling mouse events and allows users to customize the behavior of their particles based onmousedown
andmouseup
events.Summary of Changes
Events.ts
file to introduceonMouseDown
andonMouseUp
events and updated theload
method to handle data for these events.EventListeners.ts
file to add separate event listeners formousedown
andmouseup
events and modified the_doMouseTouchClick
method to handle these events separately.Bubbler.ts
andAttractor.ts
files to handlemousedown
andmouseup
events separately in theinteract
method.FullScreen.md
documentation to reflect the changes made to theonClick
event and introduced the newonMouseDown
andonMouseUp
events.Please review and merge these changes.
Fixes #4982.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: