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

Add option to use 'vertical+horizontal' knobs #67

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Asmatzaile
Copy link

Closes #66.
I set aria-orientation to vertical with knobs that can be dragged both vertically and horizontally because vertical is the default for audio applications.
Note that keyboard users could already move any type of knob with all arrow keys (up/down and left/right) independently of the orientation of the knob. This new option brings that same feature to mouse users.

@Asmatzaile
Copy link
Author

Rethinking about this issue, maybe the best option would be to leverage use-gesture's axis option to provide the four of its alternatives to the user.
So, for backward compatibility (if it's important, even when the project is in beta), the React KnobHeadless component could have a new prop, called axis as well. Its values can be the same as the use-gesture ones, and a value named 'compatibility' could be added and set by default. Then, the actual use-gesture axis would be determined by orientation if the KnobHeadless axis was equal to compatibility.

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

Successfully merging this pull request may close these issues.

Support for horizontal+vertical orientation
1 participant