Created
March 19, 2009 03:00
-
-
Save inklesspen/81561 to your computer and use it in GitHub Desktop.
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
@implementation TileDocumentView : CPView | |
{ | |
} | |
- (void)mouseDragged:(CPEvent)anEvent | |
{ | |
var point = [self convertPoint:[anEvent locationInWindow] fromView:nil]; | |
var view = [self hitTest: point]; | |
if (view && view != self) | |
{ | |
if ([[view tile] draggable]) | |
{ | |
CPLog.info("Dragging"); | |
[[CPPasteboard pasteboardWithName:CPDragPboard] declareTypes:[TileDragType] owner:self]; | |
[self dragView:view | |
at:[[view] frame].origin | |
offset:CGPointMakeZero() | |
event:anEvent | |
pasteboard:nil | |
source:self | |
slideBack:YES]; | |
} | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment