bartgryszko / bartgryszko/react-native-circular-slider

Slider doesn't accurately react to touch.

Open
#17 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
884
Forks
189
PR merge metrics
No merged PRs in 30d

Description

I was messing around with the slider code and noticed that often when you are moving it around the circle it will not properly adjust itself to the exact position it should be in.

Images below show the error being reproduced in an android emulator and i have also tried compiling to native android and running again, still the same issue.

Basically what is happening is that at 12 o'clock the button correctly follows the mouse movements but as i move around the circle it does not perfectly follow the touch position onscreen. i feel this is a maths error since it starts correctly at the 12 position and ill be diving into trying to fix the issue myself after i do some other work but i thought id run it past here in case i can get a nice point to somewhere to start, anything is appreciated.

The red lines in the images are the mouse position. All the movements in the screenshots are counter clockwise bar the 12 0'clock position image so you can tell where the onTouchEnd position is.

![screen shot 2017-08-14 at 09 32 39](https://user-images.githubusercontent.com/18634137/29264144-cf5b6492-80d3-11e7-8391-5c4be5e9ff89.png)
![screen shot 2017-08-14 at 09 32 58](https://user-images.githubusercontent.com/18634137/29264141-cf4df50a-80d3-11e7-97fc-a0f4380b12cc.png)
![screen shot 2017-08-14 at 09 33 04](https://user-images.githubusercontent.com/18634137/29264142-cf4ece6c-80d3-11e7-9df9-20bc511c4382.png)
![screen shot 2017-08-14 at 09 33 15](https://user-images.githubusercontent.com/18634137/29264145-cf5e551c-80d3-11e7-8642-59164977288e.png)
![screen shot 2017-08-14 at 09 33 56](https://user-images.githubusercontent.com/18634137/29264143-cf4f396a-80d3-11e7-8b56-869f7327bbed.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the slider behavior in the Android emulator and native Android build, then inspect the slider code around touch handling and onTouchEnd. Compare the touch position with the circular slider position at 12 o'clock and while moving counter-clockwise; done means the button follows the touch position accurately around the circle.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.