This pull request makes sure that sliders act correctly when placed closely together in a concentric arrangement, like on the time picker demo application.
The problem was that touches were being registered by the slider even though it was outside of the circle, yet within its frame rectangle.
By implementing a containment check inside pointInside:withEvent:, such touch events are not captured; Cocoa passes touch events DOWN view hierarchy to views that sit beneath the slider — which is another slider, in our case.
Subsequently beginTrackingWithTouch:withEvent: is only invoked for touches within the circle (with a fat-finger allowance of +11 points — seems to work alright!), which is what we want!
This is a fix for #13.
This pull request makes sure that sliders act correctly when placed closely together in a concentric arrangement, like on the time picker demo application.
The problem was that touches were being registered by the slider even though it was outside of the circle, yet within its frame rectangle.
By implementing a containment check inside
pointInside:withEvent:
, such touch events are not captured; Cocoa passes touch events DOWN view hierarchy to views that sit beneath the slider — which is another slider, in our case.Subsequently
beginTrackingWithTouch:withEvent:
is only invoked for touches within the circle (with a fat-finger allowance of +11 points — seems to work alright!), which is what we want!