-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
ETNoteScrollView.m
39 lines (30 loc) · 903 Bytes
/
ETNoteScrollView.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// ETNoteScrollView.m
// Notation
//
// Created by David Halter on 10/3/16.
// Copyright © 2016 David Halter. All rights reserved.
//
#import "ETNoteScrollView.h"
#import "LinkingEditor.h"
@implementation ETNoteScrollView
//- (void)awakeFromNib{
//}
- (NSView *)hitTest:(NSPoint)aPoint{
NSRect vsRect=[[self verticalScroller] frame];
vsRect.origin.x-=4.0;
vsRect.size.width+=4.0;
if (NSPointInRect (aPoint,vsRect)) {
return [self verticalScroller];
}else if (IsLionOrLater){
NSView *tView=[super hitTest:aPoint];
BOOL tViewIsDoc=(tView==self.documentView);
if (tViewIsDoc||[tView isKindOfClass:self.class]||[tView isKindOfClass:NSClassFromString(@"ETClipView")]){
[self.documentView setMouseInside:YES];
return self.documentView;
}
return tView;
}
return [super hitTest:aPoint];
}
@end