Skip to content

Commit

Permalink
Removing limitation on where the turn knob can be started.
Browse files Browse the repository at this point in the history
Limiting the angle in angleBetweenCenterAndPoint: disallows grabbing the
knob in angle < minimumAngle and angle > maximumAngle.  Since
setValue:animated: checks the value limits we can simply remove checking
the angle limits in angleBetweenCenterAndPoint:.
  • Loading branch information
Slobodan Pejic committed Feb 26, 2011
1 parent 18bcfe0 commit 031c5af
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Classes/MHRotaryKnob.m
Expand Up @@ -36,11 +36,6 @@ - (float)angleBetweenCenterAndPoint:(CGPoint)point
// coordinate system is turned upside down and rotated 90 degrees. :-)
float theAngle = atan2(point.x - center.x, center.y - point.y) * 180.0f/M_PI;

if (theAngle < minimumAngle)
theAngle = minimumAngle;
else if (theAngle > maximumAngle)
theAngle = maximumAngle;

return theAngle;
}

Expand Down

0 comments on commit 031c5af

Please sign in to comment.