Skip to content

Commit

Permalink
Fixed indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovico Giammarino committed May 31, 2016
1 parent 33d2143 commit edb38df
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion JNWCollectionView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
AB38E38D17DF099A00D50B3C /* JNWScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JNWScrollView.m; path = external/JNWScrollView/JNWScrollView.m; sourceTree = SOURCE_ROOT; };
AB39819C1731A1B50062B2E0 /* JNWCollectionViewReusableView+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "JNWCollectionViewReusableView+Private.h"; path = "JNWCollectionView/JNWCollectionViewReusableView+Private.h"; sourceTree = SOURCE_ROOT; };
AB3C71E8170CA8D3004A91DB /* JNWCollectionViewFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JNWCollectionViewFramework.h; path = JNWCollectionView/JNWCollectionViewFramework.h; sourceTree = SOURCE_ROOT; };
AB3C71E9170CA8D3004A91DB /* JNWCollectionViewFramework.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; name = JNWCollectionViewFramework.m; path = JNWCollectionView/JNWCollectionViewFramework.m; sourceTree = SOURCE_ROOT; usesTabs = 1; };
AB3C71E9170CA8D3004A91DB /* JNWCollectionViewFramework.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JNWCollectionViewFramework.m; path = JNWCollectionView/JNWCollectionViewFramework.m; sourceTree = SOURCE_ROOT; usesTabs = 1; };
AB3C71EA170CA8D3004A91DB /* JNWCollectionView+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "JNWCollectionView+Private.h"; path = "JNWCollectionView/JNWCollectionView+Private.h"; sourceTree = SOURCE_ROOT; };
AB3C71EB170CA8D3004A91DB /* JNWCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JNWCollectionViewCell.h; path = JNWCollectionView/JNWCollectionViewCell.h; sourceTree = SOURCE_ROOT; };
AB3C71EC170CA8D3004A91DB /* JNWCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JNWCollectionViewCell.m; path = JNWCollectionView/JNWCollectionViewCell.m; sourceTree = SOURCE_ROOT; };
Expand Down
24 changes: 12 additions & 12 deletions JNWCollectionView/JNWCollectionViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ - (void)willLayoutWithFrame:(CGRect)frame {
}

- (void)updateTrackingAreas {
[[self.trackingAreas copy] enumerateObjectsUsingBlock:^(NSTrackingArea * _Nonnull trackingArea, NSUInteger idx, BOOL * _Nonnull stop) {
[self removeTrackingArea:trackingArea];
}];
[[self.trackingAreas copy] enumerateObjectsUsingBlock:^(NSTrackingArea * _Nonnull trackingArea, NSUInteger idx, BOOL * _Nonnull stop) {
[self removeTrackingArea:trackingArea];
}];

NSTrackingAreaOptions options = (NSTrackingActiveAlways | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved);
NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect:[self bounds] options:options owner:self userInfo:nil];
[self addTrackingArea:area];
NSTrackingAreaOptions options = (NSTrackingActiveAlways | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved);
NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect:[self bounds] options:options owner:self userInfo:nil];
[self addTrackingArea:area];
}

- (NSView *)contentView {
Expand Down Expand Up @@ -184,21 +184,21 @@ - (void)mouseUp:(NSEvent *)theEvent {
}

- (void)mouseMoved:(NSEvent *)theEvent {
[super mouseMoved:theEvent];
[super mouseMoved:theEvent];

[self.collectionView mouseMovedInCollectionViewCell:self withEvent:theEvent];
[self.collectionView mouseMovedInCollectionViewCell:self withEvent:theEvent];
}

- (void)mouseEntered:(NSEvent *)theEvent {
[super mouseMoved:theEvent];
[super mouseMoved:theEvent];

[self.collectionView mouseEnteredInCollectionViewCell:self withEvent:theEvent];
[self.collectionView mouseEnteredInCollectionViewCell:self withEvent:theEvent];
}

- (void)mouseExited:(NSEvent *)theEvent {
[super mouseMoved:theEvent];
[super mouseMoved:theEvent];

[self.collectionView mouseExitedInCollectionViewCell:self withEvent:theEvent];
[self.collectionView mouseExitedInCollectionViewCell:self withEvent:theEvent];
}

- (void)rightMouseDown:(NSEvent *)theEvent {
Expand Down
20 changes: 10 additions & 10 deletions JNWCollectionView/JNWCollectionViewFramework.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,18 @@ - (void)setDelegate:(id<JNWCollectionViewDelegate>)delegate {
_delegate = delegate;
_collectionViewFlags.delegateMouseUp = [delegate respondsToSelector:@selector(collectionView:mouseUpInItemAtIndexPath: withModifierFlags:)];
_collectionViewFlags.delegateMouseDown = [delegate respondsToSelector:@selector(collectionView:mouseDownInItemAtIndexPath:withModifierFlags:)];
_collectionViewFlags.delegateMouseMoved = [delegate respondsToSelector:@selector(collectionView:mouseMovedInItemAtIndexPath:withModifierFlags:)];
_collectionViewFlags.delegateMouseEntered = [delegate respondsToSelector:@selector(collectionView:mouseEnteredInItemAtIndexPath:withModifierFlags:)];
_collectionViewFlags.delegateMouseMoved = [delegate respondsToSelector:@selector(collectionView:mouseMovedInItemAtIndexPath:withModifierFlags:)];
_collectionViewFlags.delegateMouseEntered = [delegate respondsToSelector:@selector(collectionView:mouseEnteredInItemAtIndexPath:withModifierFlags:)];
_collectionViewFlags.delegateMouseExited = [delegate respondsToSelector:@selector(collectionView:mouseExitedInItemAtIndexPath:withModifierFlags:)];
_collectionViewFlags.delegateShouldSelect = [delegate respondsToSelector:@selector(collectionView:shouldSelectItemAtIndexPath:)];
_collectionViewFlags.delegateDidSelect = [delegate respondsToSelector:@selector(collectionView:didSelectItemAtIndexPath:)];
_collectionViewFlags.delegateShouldDeselect = [delegate respondsToSelector:@selector(collectionView:shouldDeselectItemAtIndexPath:)];
_collectionViewFlags.delegateDidDeselect = [delegate respondsToSelector:@selector(collectionView:didDeselectItemAtIndexPath:)];
_collectionViewFlags.delegateDidDoubleClick = [delegate respondsToSelector:@selector(collectionView:didDoubleClickItemAtIndexPath:)];
_collectionViewFlags.delegateDidRightClick = [delegate respondsToSelector:@selector(collectionView:didRightClickItemAtIndexPath:)];
_collectionViewFlags.delegateDidEndDisplayingCell = [delegate respondsToSelector:@selector(collectionView:didEndDisplayingCell:forItemAtIndexPath:)];
_collectionViewFlags.delegateShouldScroll = [delegate respondsToSelector:@selector(collectionView:shouldScrollToItemAtIndexPath:)];
_collectionViewFlags.delegateDidScroll = [delegate respondsToSelector:@selector(collectionView:didScrollToItemAtIndexPath:)];
_collectionViewFlags.delegateDidEndDisplayingCell = [delegate respondsToSelector:@selector(collectionView:didEndDisplayingCell:forItemAtIndexPath:)];
_collectionViewFlags.delegateShouldScroll = [delegate respondsToSelector:@selector(collectionView:shouldScrollToItemAtIndexPath:)];
_collectionViewFlags.delegateDidScroll = [delegate respondsToSelector:@selector(collectionView:didScrollToItemAtIndexPath:)];
}

- (void)setDataSource:(id<JNWCollectionViewDataSource>)dataSource {
Expand Down Expand Up @@ -505,10 +505,10 @@ - (NSArray *)indexPathsForVisibleItems {
}

- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(JNWCollectionViewScrollPosition)scrollPosition animated:(BOOL)animated {
if (_collectionViewFlags.delegateShouldScroll && ![self.delegate collectionView:self shouldScrollToItemAtIndexPath:indexPath]) {
return;
}
if (_collectionViewFlags.delegateShouldScroll && ![self.delegate collectionView:self shouldScrollToItemAtIndexPath:indexPath]) {
return;
}

CGRect rect = [self rectForItemAtIndexPath:indexPath];
CGRect visibleRect = self.documentVisibleRect;

Expand Down Expand Up @@ -965,7 +965,7 @@ - (void)selectItemAtIndexPath:(NSIndexPath *)indexPath
selectionType:(JNWCollectionViewSelectionType)selectionType {
if (indexPath == nil)
return;
NSMutableSet *indexesToSelect = [NSMutableSet set];

if (selectionType == JNWCollectionViewSelectionTypeSingle) {
Expand Down

0 comments on commit edb38df

Please sign in to comment.