yoannmoinet / nipplejs

:video_game: A virtual joystick for touch capable interfaces.
https://yoannmoinet.github.io/nipplejs
MIT License
1.78k stars 185 forks source link

[FEAT] Only count touches when joystick is pressed down #171

Open ChocolateLoverRaj opened 2 years ago

ChocolateLoverRaj commented 2 years ago

Is your feature request related to a problem? Please describe. I like the follow option, how the joystick can be dragged anywhere in the zone. I don't want the joystick to be controlled when mousedown happens somewhere else in the zone besides the joystick.

Describe the solution you'd like Maybe an option like touchAnywhere which I can set to false.

Describe alternatives you've considered catchDistance is a similar option, but it doesn't do what I'm trying to do.

Additional context

https://user-images.githubusercontent.com/52586855/145913081-9f7a7c1a-a2c4-4c2c-8880-fc92996f5bec.mp4