Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IKImageView subclass to prevent the default ikimageview dragging beha…
…vior
- Loading branch information
1 parent
826af1c
commit d129c5a
Showing
6 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,17 @@ | |||
// | |||
// SWImageView.h | |||
// VertexHelper | |||
// | |||
// Created by Johannes Fahrenkrug on 21.12.10. | |||
// Copyright 2010 Springenwerk. All rights reserved. | |||
// | |||
|
|||
#import <Foundation/Foundation.h> | |||
#import <Quartz/Quartz.h> | |||
|
|||
|
|||
@interface SWImageView : IKImageView { | |||
|
|||
} | |||
|
|||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
// | |||
// SWImageView.m | |||
// VertexHelper | |||
// | |||
// Created by Johannes Fahrenkrug on 21.12.10. | |||
// Copyright 2010 Springenwerk. All rights reserved. | |||
// | |||
|
|||
#import "SWImageView.h" | |||
|
|||
|
|||
@implementation SWImageView | |||
|
|||
|
|||
// this is a hack. We don't want to see the red annotation circles | |||
// when we drag in annotation mode. So we swallow drag events | |||
// unless we're in move mode. | |||
- (void)mouseDragged:(NSEvent *)theEvent { | |||
if (self.currentToolMode == IKToolModeMove) { | |||
[super mouseDragged:theEvent]; | |||
} | |||
} | |||
|
|||
|
|||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters