-
Notifications
You must be signed in to change notification settings - Fork 1.3k
spotrem: add volume knob gesture #3847
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
base: master
Are you sure you want to change the base?
Conversation
Very cool! Works well when I tested it. Do you think it's worth mentioning that the clockwise/anticlockwise gesture detection is stopped after a brief period of no-interaction? Not for this PR, but if you wanted ideas on going further with this feature, it'd be cool to pull it out to a library and let other apps opt into the clockwise gesture, and during the clockwise gesture, display a circle on screen that follows the user's gesture. But obviously those are much bigger changes! |
Thanks :)
Yes! Will add that.
Yes - that's where I started with this. But I switched to this focused implementation first to dial in the UX (pun intended). |
Only the drag gesture functionality provided. I intend to add a companion module providing some relevant graphics, sharing the same options object.
@bobrippling this is maybe done now! Please comment any feedback you may have :) It now adds two new modules for dial functionality, one for touch interaction and one for graphics. This is used in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobrippling this is maybe done now! Please comment any feedback you may have :)
It now adds two new modules for dial functionality, one for touch interaction and one for graphics. This is used in
spotrem
to provide the volume knob.
Great, nice separation of functionality! I spotted a few things, let me know if I've been unclear or if you've any questions :)
|
||
```JS | ||
var DialDisplay = require("Dial_Display"); | ||
var dialDisplay = new DialDisplay(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same again (as the other comment), but here I think we'll want to change to make it more class-like, or alter how this
is used within the dialDisplay
function. At the moment it'll be writing to the global object.
For example, in the IDE:
> cb
=function (step) { ... }
>cb(1)
=undefined
>cb(1)
=undefined
// the dial renders successfully
// `this` variables are written to the global:
>isFirstDraw
=false
>value
=14
Happy to go through a few suggestions for it, if you like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to go through a few suggestions for it, if you like
Please do! Fun with a learning opportunity :) Feel free to commit to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, I'll pop something together
Can be tried at: https://thyttan.github.io/BangleApps/?id=spotrem
Edit:
Adds two new modules for dial functionality, one for touch interaction and one for graphics. This is used in
spotrem
to provide the volume knob.