Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug #47 #60

Merged
merged 2 commits into from
Aug 18, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/BEMPathManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ - (UIBezierPath *)pathForBox {
UIBezierPath* path;
switch (self.boxType) {
case BEMBoxTypeSquare:
path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, self.size, self.size) cornerRadius:self.cornerRadius];
path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0.0 + (_lineWidth / 2.0), 0.0 + (_lineWidth / 2.0), self.size - _lineWidth, self.size - _lineWidth) cornerRadius:self.cornerRadius];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The rest of the project uses self to access properties instead of ivars. Would you mind replacing _lineWidth with self.liveWidth for consistency?

[path applyTransform:CGAffineTransformRotate(CGAffineTransformIdentity, M_PI * 2.5)];
[path applyTransform:CGAffineTransformMakeTranslation(self.size, 0)];
break;

default: {
CGFloat radius = self.size / 2;
CGFloat radius = (self.size / 2.0) - (self.lineWidth / 2.0);;
path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.size / 2, self.size / 2)
radius: radius
startAngle: - M_PI / 4
Expand Down