Skip to content

Commit

Permalink
[ASCollectionNode] Fix missing properties and layoutInspector #trivial (
Browse files Browse the repository at this point in the history
#305)

* [ASCollectionNode] Set the layoutInspector from the pendingState in didLoad.

* [ASCollectionNode] Forward scroll properties from the view.
  • Loading branch information
flovouin authored and Adlai-Holler committed May 29, 2017
1 parent f7b9855 commit be956e9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/ASCollectionNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ - (void)didLoad
view.inverted = pendingState.inverted;
view.allowsSelection = pendingState.allowsSelection;
view.allowsMultipleSelection = pendingState.allowsMultipleSelection;
view.layoutInspector = pendingState.layoutInspector;

if (pendingState.rangeMode != ASLayoutRangeModeUnspecified) {
[view.rangeController updateCurrentRangeWithMode:pendingState.rangeMode];
Expand Down Expand Up @@ -427,6 +428,16 @@ - (UICollectionViewLayout *)collectionViewLayout
}
}

- (ASScrollDirection)scrollDirection
{
return [self isNodeLoaded] ? self.view.scrollDirection : ASScrollDirectionNone;
}

- (ASScrollDirection)scrollableDirections
{
return [self isNodeLoaded] ? self.view.scrollableDirections : ASScrollDirectionNone;
}

- (ASElementMap *)visibleElements
{
ASDisplayNodeAssertMainThread();
Expand Down

0 comments on commit be956e9

Please sign in to comment.