Fixed: issue with determinate spinning progressBar annd value not between 0 and 100

This commit is contained in:
Alexandre Wilhelm
2015-05-13 10:06:54 -07:00
parent 57b68880db
commit 899bbc2dbc
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -461,7 +461,7 @@ var CPProgressIndicatorSpinningStyleColors = [];
{
var midX = CGRectGetMidX(rect),
midY = CGRectGetMidY(rect),
endAngle = Math.PI * 2 * ([self doubleValue] / ([self maxValue] - [self minValue])) - Math.PI / 2,
endAngle = Math.PI * 2 * (([self doubleValue] - [self minValue]) / ([self maxValue] - [self minValue])) - Math.PI / 2,
radius = MIN(rect.size.width / 2, rect.size.height / 2)
CGContextBeginPath(context);
@@ -36,7 +36,10 @@
[fiftyPercentBar setDoubleValue:50];
[hundredPercentBar setDoubleValue:100];
[twentyPercentCircular setDoubleValue:20];
[twentyPercentCircular setMaxValue:200];
[twentyPercentCircular setMinValue:50];
[twentyPercentCircular setDoubleValue:80];
[fiftyPercentCircular setDoubleValue:50];
[hundredPercentCircular setDoubleValue:100];