CircularRangeSlider-Android icon indicating copy to clipboard operation
CircularRangeSlider-Android copied to clipboard

startIndex and endIndex have the wrong values for certain indices when max index is too high

Open ronenfe opened this issue 3 years ago • 2 comments

I have a CircularRangeSlider with max set to 31.

On the event onRangeRelease,onRangeChange, when I set startIndex or endIndex in the ui for the following values: It receives it as the value - 1: 16, 17, 19, 20, 23, 24, 25, 28, those bad indices can change depending on max index. I think it's because the physical distance in the graphic is too small. The thing is the ui shows the selection correctly so I think it's an easy fix. The maximum working max value is 30. Any max set to above 30 causes this bug.

ronenfe avatar Apr 27 '22 21:04 ronenfe

https://github.com/bikcrum/CircularRangeSlider-Android/assets/8763689/25dd9122-ec44-4840-bb01-3529d64b35a1

I have made a sample project demonstrating the bug:

https://github.com/ronenfe/CircularSliderBugSample

ronenfe avatar May 28 '24 12:05 ronenfe

FIxed, The bug happens when endindex is even.

ronenfe avatar May 28 '24 18:05 ronenfe