Merge pull request #3083 from michaelbach/patch-2

fixied: bindings for case  'only stop at tick marks'
This commit is contained in:
daboe01
2024-07-16 19:13:32 +02:00
committed by GitHub
+6
View File
@@ -312,6 +312,12 @@ var AFFINITY = 5;
if (!trackRect || CGRectIsEmpty(trackRect))
trackRect = bounds;
if (_allowsTickMarkValuesOnly)
{
[self closestTickMarkValueToValue:[self doubleValue]]; // we only need the side effect …
_currentTickMarkSegment = _closestTickMarkIndex;
}
if (_isCircular)
{
var angle = 3 * PI_2 - (1.0 - [self doubleValue] - _minValue) / (_maxValue - _minValue) * PI2,