Archived
1

Cleaned Code by Removing Location Tracking for Errors

This commit is contained in:
Kim Wittenburg
2014-11-07 19:50:28 +01:00
parent 91e7dbe9f2
commit 139a75f816
59 changed files with 355 additions and 532 deletions

View File

@@ -122,10 +122,7 @@
- (NSPoint)offsetOfChildLayoutAtIndex:(NSUInteger)index
{
if (index == 0) {
return NSMakePoint(self.openingParens.bounds.size.width + MPParenthesisFunctionOpeningParensOffset, 0);
}
return NSZeroPoint;
return NSMakePoint(self.openingParens.bounds.size.width + MPParenthesisFunctionOpeningParensOffset, 0);
}
- (NSIndexPath *)indexPathForLocalMousePoint:(NSPoint)point
@@ -166,16 +163,19 @@
MPLayout *expressionLayout = [self childLayoutAtIndex:0];
NSBezierPath *closingParens = self.transformedClosingParens;
CGFloat x = 0;
CGFloat y = -openingParens.bounds.origin.y + expressionLayout.bounds.origin.y;
NSAffineTransform *transform = [NSAffineTransform transform];
[transform translateXBy:0
yBy:y];
[openingParens transformUsingAffineTransform:transform];
[openingParens fill];
x += openingParens.bounds.size.width;
x += MPParenthesisFunctionOpeningParensOffset;
x += expressionLayout.bounds.size.width;
x += MPParenthesisFunctionClosingParensOffset;
NSAffineTransform *transform = [NSAffineTransform transform];
[transform translateXBy:x
yBy:0];
[closingParens transformUsingAffineTransform:transform];