Prepared to implement improved keyboard navigation
This commit is contained in:
@@ -23,6 +23,16 @@
|
||||
return (MPSumFunction *)self.function;
|
||||
}
|
||||
|
||||
- (NSUInteger)indexOfLeadingChild
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (NSUInteger)indexOfTrailingChild
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (CTLineRef)line
|
||||
{
|
||||
CTLineRef line = [self lineForPrivateCacheIndex:0 generator:^CTLineRef{
|
||||
@@ -75,7 +85,7 @@
|
||||
childBounds.origin.x += childOffset.x;
|
||||
childBounds.origin.y += childOffset.y;
|
||||
if (NSMouseInRect(point, childBounds, self.flipped)) {
|
||||
NSPoint pointInChild = NSMakePoint(point.x + childOffset.x, point.y + childOffset.y);
|
||||
NSPoint pointInChild = NSMakePoint(point.x - childOffset.x, point.y - childOffset.y);
|
||||
NSIndexPath *subPath = [childLayout indexPathForMousePoint:pointInChild];
|
||||
return [subPath indexPathByPreceedingIndex:index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user