You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more documentation of the hack I used to deal with this problem. When floats forced down onto a new row meet a taller element (other than the last of the previous row), they're pushed to the right. This causes Orderly to miscalculate the length of each row (as pushed rows will have less elements than they should).
This can be especially confusing when used with method: 'children', as the rows generally end up correctly aligned, but certain children may have been resized based on the previously incorrect row lengths.
I couldn't think of an efficient way to deal with this, so I've changed method: 'children' to not only register Orderly on the parent after the children, but also before the children. This causes Orderly to resize the parent rows twice. First, to settle any issues with floats (by giving them equal heights per row), then again to match the final sum heights of the child elements.
Feels dirty, but it works for now.
I wonder if it is actually necessary to register Orderly on the parent at all? Perhaps it could follow something more like:
Resize parent
Resize children
Reset parent
That way, at least the last execution on parent is more efficient. If it's absolutely necessary, the user could always manually register Orderly on the parent. We'd just redefine method: 'children' to mean registering Orderly on all the children of element, but not the element itself.
The text was updated successfully, but these errors were encountered:
This is more documentation of the hack I used to deal with this problem. When floats forced down onto a new row meet a taller element (other than the last of the previous row), they're pushed to the right. This causes Orderly to miscalculate the length of each row (as pushed rows will have less elements than they should).
This can be especially confusing when used with
method: 'children'
, as the rows generally end up correctly aligned, but certain children may have been resized based on the previously incorrect row lengths.I couldn't think of an efficient way to deal with this, so I've changed
method: 'children'
to not only register Orderly on the parent after the children, but also before the children. This causes Orderly to resize the parent rows twice. First, to settle any issues with floats (by giving them equal heights per row), then again to match the final sum heights of the child elements.Feels dirty, but it works for now.
I wonder if it is actually necessary to register Orderly on the parent at all? Perhaps it could follow something more like:
That way, at least the last execution on parent is more efficient. If it's absolutely necessary, the user could always manually register Orderly on the parent. We'd just redefine
method: 'children'
to mean registering Orderly on all the children of element, but not the element itself.The text was updated successfully, but these errors were encountered: