Skip to content

Add bi-directional props to Joystick component #16

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
mtwichan opened this issue Jul 18, 2018 · 2 comments
Open

Add bi-directional props to Joystick component #16

mtwichan opened this issue Jul 18, 2018 · 2 comments

Comments

@mtwichan
Copy link

In cases where the joystick should only move in 2 directions (up and down only or left and right only) it would be nice to have it so the joystick only moves in the two specified directions, so users don't get confused with empty commands.

@yoannmoinet
Copy link

it's supported by nipplejs (used by dash-daq) out of the box.

@Karan-S-Mittal
Copy link
Contributor

you can now give two new props to the joystick component for the same.

Preview

Screen.Recording.2021-10-23.at.8.51.32.PM.mov

Code

This will lock the movement of stick in Y direction so you can only move it vertically.
Joystick( label="Joystick", labelPosition="bottom", lockX=False, lockY=True ),

Karan-S-Mittal added a commit to Karan-S-Mittal/dash-daq that referenced this issue Oct 23, 2021
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