Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

[ASScrollNode] Add .scrollDirection property so that internal content sizing can be easily "unlimited" in the direction of scrolling. #3001

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

appleguy
Copy link
Contributor

@appleguy appleguy commented Feb 8, 2017

No description provided.

@rurza
Copy link

rurza commented Feb 8, 2017

This fixes issue when setting automaticallyManagesContentSize didn't work as expected.
I tried with different sizes for preferredSize, implementation of nodeConstrainedSize in VC. Nothing.
With this PR just set scrollDirection.
I think that setting scrollDirection should set automaticallyManagesContentSize though.

@davertay
Copy link

davertay commented Feb 8, 2017

This works for my example where I have an ASScrollNode with a simple vertical ASStackLayoutSpec containing nodes all set to 100% width: https://github.com/davertay/asdkScrollExample

Without this change the contentSize was always being set to the view bounds, even when overriding nodeConstrainedSize in the ASViewController.

Note that this probably also fixes #2851

Copy link
Contributor

@garrettmoon garrettmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the setter and getter need to be defined for this so that they can hold the instance lock?

Separately, scrollDirection is already defined on ASScrollView as well as scrollableDirections. I think the scrollDirection you're providing here is akin to scrollableDirections on ASScrollView. Any way to reconcile all of this?

… sizing can be easily "unlimited" in the direction of scrolling.
Copy link
Contributor

@garrettmoon garrettmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@appleguy appleguy merged commit ca8fcdf into master Feb 9, 2017
@appleguy
Copy link
Contributor Author

appleguy commented Feb 9, 2017

Discussed in Slack. Thanks for the reviews everyone!

@appleguy appleguy deleted the ScrollDirection branch February 9, 2017 00:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants