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

Is there a way to control the slider speed ? #148

Open
1 task
nadavstern opened this issue Dec 28, 2020 · 3 comments
Open
1 task

Is there a way to control the slider speed ? #148

nadavstern opened this issue Dec 28, 2020 · 3 comments

Comments

@nadavstern
Copy link

nadavstern commented Dec 28, 2020

What kind of issue is this?

  • Feature Request. is it possible to control the speed / add some opposition ?

Details

I want to change to add some opposition:
Example:

on sliding right, I would like to add some kind of opposition - in contrast to the sliding direction
so it will be harder / easier to change the slider position
I would like to have some kind of number (set to 1 by default) so this factor value will multiply with the current movement
a number lesser than 1 will make it easier / harder to get the slider into it's desired position
a number greater than 1 will make it harder / easier to get the slider into it's desired position

Thanks

@nadavstern nadavstern changed the title Is there a way to control the slider speed ? Is there a way to control the slider speed ? FeatureRequest Dec 28, 2020
@nadavstern nadavstern changed the title Is there a way to control the slider speed ? FeatureRequest Is there a way to control the slider speed ? Dec 28, 2020
@cortinico
Copy link
Owner

a number lesser than 1 will make it easier / harder to get the slider into it's desired position
a number greater than 1 will make it harder / easier to get the slider into it's desired position

This is currently not possible. The slider follows the user touch point, and is rendered just beneath it. To implement your solution we should break this assumption. It will probably require the user to to multiple gestures making the widget more complicated and less intuitive imho.

Can you describe your use case?

@nadavstern
Copy link
Author

nadavstern commented Dec 30, 2020

Thanks for responding
I need to create a challenge in which I should be able to define how easy / hard it is to slide it from right to left or left to right
I use it for collecting data and create a user model for each user using the slider

@cortinico
Copy link
Owner

Thanks for clarification. I believe that slidetoact is not the right library for you then. You should probably work on something custom that intercepts the touch events and computes the user speed.

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

2 participants