Open rupadas opened 8 years ago
Hello @rupadas
I solved this by halving the gapBetweenThumbs variable in the RangeSlider class like this:
var gapBetweenThumbs: Double {
return Double(thumbWidth)*(maximumValue - minimumValue) / (Double(bounds.width)*2)
}
@Sundin @rupadas This still didn't work for me. I was able to produce a range of 1 by using this:
var gapBetweenThumbs: Double {
var gap = (upperValue - lowerValue) / (Double(bounds.width)*2)
return max(1.0, gap)
}
Hi @rupadas @Sundin & @khaptonstall , First of all thanks for giving this project a try 👍 If @khaptonstall 's change really does the trick, can you please create a PR so that I can merge easily ?
Thanks ! 💯
@warchimede While it does allow for a single Int
gap and solves this specific problem, it would break other things. Such as:
Double
x, where lowerValue
< x < upperValue
So I think further user customization would need to be added instead of my hacky change.
I am unable to select a range of gap one like 33-34. How can i achieve that?