Skip to content

Commit cc0a18c

Browse files
committed
Call super from all event methods in both hosting views.
1 parent 73794b7 commit cc0a18c

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎framework/MacOnly/CPTGraphHostingView.m‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ -(BOOL)acceptsFirstMouse:(NSEvent *)theEvent
211211

212212
-(void)mouseDown:(NSEvent *)theEvent
213213
{
214+
[super mouseDown:theEvent];
215+
214216
CPTGraph *theGraph = self.hostedGraph;
215217
BOOL handled = NO;
216218

@@ -227,6 +229,8 @@ -(void)mouseDown:(NSEvent *)theEvent
227229

228230
-(void)mouseDragged:(NSEvent *)theEvent
229231
{
232+
[super mouseDragged:theEvent];
233+
230234
CPTGraph *theGraph = self.hostedGraph;
231235
BOOL handled = NO;
232236

@@ -243,6 +247,8 @@ -(void)mouseDragged:(NSEvent *)theEvent
243247

244248
-(void)mouseUp:(NSEvent *)theEvent
245249
{
250+
[super mouseUp:theEvent];
251+
246252
CPTGraph *theGraph = self.hostedGraph;
247253
BOOL handled = NO;
248254

@@ -266,6 +272,8 @@ -(void)mouseUp:(NSEvent *)theEvent
266272

267273
-(void)magnifyWithEvent:(NSEvent *)event
268274
{
275+
[super magnifyWithEvent:event];
276+
269277
CPTGraph *theGraph = self.hostedGraph;
270278
BOOL handled = NO;
271279

@@ -291,6 +299,8 @@ -(void)magnifyWithEvent:(NSEvent *)event
291299

292300
-(void)scrollWheel:(NSEvent *)theEvent
293301
{
302+
[super scrollWheel:theEvent];
303+
294304
CPTGraph *theGraph = self.hostedGraph;
295305
BOOL handled = NO;
296306

‎framework/iPhoneOnly/CPTGraphHostingView.m‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ -(instancetype)initWithCoder:(NSCoder *)coder
131131

132132
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
133133
{
134+
[super touchesBegan:touches withEvent:event];
135+
134136
// Ignore pinch or other multitouch gestures
135137
if ( [[event allTouches] count] > 1 ) {
136138
return;
@@ -158,6 +160,8 @@ -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
158160

159161
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
160162
{
163+
[super touchesMoved:touches withEvent:event];
164+
161165
CPTGraph *theHostedGraph = self.hostedGraph;
162166

163167
theHostedGraph.frame = self.bounds;
@@ -180,6 +184,8 @@ -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
180184

181185
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
182186
{
187+
[super touchesEnded:touches withEvent:event];
188+
183189
CPTGraph *theHostedGraph = self.hostedGraph;
184190

185191
theHostedGraph.frame = self.bounds;
@@ -202,6 +208,8 @@ -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
202208

203209
-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
204210
{
211+
[super touchesCancelled:touches withEvent:event];
212+
205213
BOOL handled = [self.hostedGraph pointingDeviceCancelledEvent:event];
206214

207215
if ( !handled ) {

0 commit comments

Comments
 (0)