Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertical, horizontal #146

Merged
merged 4 commits into from
Oct 9, 2019
Merged

Conversation

Kuluum
Copy link
Contributor

@Kuluum Kuluum commented Oct 4, 2019

Add vertical, horizontal and horizontalDirected to absolute positioning. Useful methods instead of .top(x).bottom(x), start(y).end(y), etc. (Just like in pin)

This method is valid only when the item position is absolute (`view.flex.position(.absolute)`)
*/
@discardableResult
public func horizontalDirected(_ value: CGFloat) -> Flex {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure that horizontalDirected is required since we set start and end to the same value, this is equivalent to setting the left and right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap, you are right, miss this moment. Will remove horizontalDirected

This method is valid only when the item position is absolute (`view.flex.position(.absolute)`)
*/
@discardableResult
public func horizontal(_ value: CGFloat) -> Flex {
Copy link
Member

Choose a reason for hiding this comment

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

Good, could you please add theses methods in the documentation (README.md) in the section https://github.com/layoutBox/FlexLayout#4-absolute-positioning.

@Kuluum
Copy link
Contributor Author

Kuluum commented Oct 7, 2019

I can also add all(). There used to be problems with horizontal \ horizontalDirected(as I thought), but now nothing prevents it.

Copy link
Member

@lucdion lucdion left a comment

Choose a reason for hiding this comment

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

Thanks for the addition 👍

Copy link
Member

@lucdion lucdion left a comment

Choose a reason for hiding this comment

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

Really good addition 👍

@lucdion lucdion merged commit d38dd60 into layoutBox:master Oct 9, 2019
@lucdion lucdion changed the title Add vertical, horizontal and horizontalDirected Add vertical, horizontal Oct 9, 2019
@lucdion
Copy link
Member

lucdion commented Oct 9, 2019

New release including your change https://github.com/layoutBox/FlexLayout/releases/tag/1.3.17

@Kuluum Kuluum deleted the additional_absolute_pos branch December 18, 2020 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants