TomThorpe / TTRangeSlider

A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
MIT License
968 stars 203 forks source link

Add barSidePadding property to public interface #84

Closed templeman15 closed 6 years ago

templeman15 commented 6 years ago

This PR allows you to update the barSidePadding property on TTRangeSlider to allow for customization of the left/right padding of the slider line.

TomThorpe commented 6 years ago

Looks good - thanks!

templeman15 commented 6 years ago

@TomThorpe I just realized that the slider handles go past the ends of the slider line by half the slider width. UISlider does not do this.

Is this something you did intentionally and is there a way to disable that behavior?

TomThorpe commented 6 years ago

Hey,

That was originally intentional yes, to make the centre of the handle line up with the position it represents on the line which seemed like a sensible way of doing it. Just played around with UISlider and never noticed that it doesn't do the same though!

I don't actually know how UISlider handles the switch from at the minimum end of the line, the left hand side of the handle representing the value, then when it gets up to the maximum end of the line, the right hand side of the handle being the value. Presumably they might pad one end of the line.

I'm open to changes if it works sensibly but for now this was intentional :-)