Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Commit

Permalink
improved snapping
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew0 committed Mar 26, 2012
1 parent 0b3a1d4 commit 183f310
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SceneDesigner/Rendering/SDDrawingView.m
Expand Up @@ -277,8 +277,9 @@ - (BOOL)ccMouseDragged:(NSEvent *)event
// snap to other nodes in
NSMutableArray *points = [NSMutableArray array];
for (CCNode<SDNodeProtocol> *child in [self children])
if ([child isKindOfClass:[CCNode class]] && [child conformsToProtocol:@protocol(SDNodeProtocol)] && child != _selectedNode)
if ([child isKindOfClass:[CCNode class]] && [child conformsToProtocol:@protocol(SDNodeProtocol)])
[points addObjectsFromArray:[self snapPointsForNode:child]];
[points removeObjectsInArray:[_selectedNode snapPoints]];

// add snap points for canvas
CGSize s = [[CCDirector sharedDirector] winSize];
Expand Down

0 comments on commit 183f310

Please sign in to comment.