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

When using minAngle and maxAngle, snap behaviour is odd #11

Open
thalisvilela opened this issue Sep 12, 2017 · 4 comments
Open

When using minAngle and maxAngle, snap behaviour is odd #11

thalisvilela opened this issue Sep 12, 2017 · 4 comments

Comments

@thalisvilela
Copy link

thalisvilela commented Sep 12, 2017

when setting kMaxAngle and kMinAngle, snapping to minAngle is OK, and when you go "before" the min angle, it tolerates quite well, but when just past the maxAngle, it snaps back to min angle with no tolerance.

@thalisvilela
Copy link
Author

If i set the kNumberOfStates = 100 for example, when i scroll it to the end, and it hits 100, it moves to the initial position, if i setState(100) programmatically, it moves to the initial position as well

@faxinadu
Copy link

same issue here... any workaround?

@faxinadu
Copy link

hmmm nothing yet? such a wonderful library but with this issue i can not use it :(

@moskito-s
Copy link

Quick and dirty workaround to keep knob from snapping back to 0 if it hits 100

 int lastState = 0;
 public void onState(int state) {
                if(state < 10 && lastState > 90) {
                    lastState = state;
                    knob.setState(100);
                }
                else lastState = state;
            }

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