Skip to content

Conversation

@tim12s
Copy link
Contributor

@tim12s tim12s commented May 18, 2016

Hi,

For certain scenarios I want to align components next to each other "to the right" while automatically wrapping to the next line if required. Different screen widths will allow a differing number of components to align next to each other. The current pull request addresses this. This does not logically apply in all scenarios. Reactive web pages commonly address this and elastic changes can happen vertically but this change will keep this simple for now.

  1. Add line wrapping capability utilizing .ToTheRightMatchingTopWrapping to indicate that a component aligned to another component on the right can wrap below and align itself to the left inside of the superview (+padding).
  2. Add a newline capability to ensure that the newline anchor is relative to the end of the previous line which may be wrapped. This uses .UnderMatchingLeftFollowing indicate that it must be under the tailing component to the left. This is applicable to both align and alignAndFillWidth.
  3. Updated the ViewController example with the necessary line wrapping examples showing both examples, with a subsequent alignAndFill.
  4. Superview was using Frame instead of Bounds to determine the superview which is incorrect when the superview undergoes translations. This was corrected.

neon-flex

…ing to indicate that a component aligned to another component on the right can wrap below and align itself to the left inside of the superview (+padding).

2. Add a newline capability to ensure that the newline anchor is relative to the end of the previous line which may be wrapped.  This uses .UnderMatchingLeftFollowing indicate that it must be under the tailing component to the left.   This is applicable to both align and alignAndFillWidth.

3. Updated the ViewController example with the necessary line wrapping examples showing both examples, with a subsequent alignAndFill.
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.

1 participant