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
If I set the layout size to 1000,1000, call autolayout, then align some element (i.e. 'alignTop'), sometimes the position of those elements is not in the appropriate swath of the layout: when I call 'alignTop', for example, nine times out of 10, the Y value is 30, and often it's in the 30's to 200's. But sometimes it's close to the middle, like '432'. I think that's too far off to really say that's at the 'top' of the layout; it's more like the hCenter.
One time, I got 'nan' values, which is also not ideal, but I don't know how to reliably get that to repeat.
The text was updated successfully, but these errors were encountered:
'alginTop' function calculates the min of the 'y' values of the selected items and set the 'y' values of all the items to that one. So, I wouldn't be surprised if you occasionally get something near to the center due to the randomness of the autolayout. In my test, I compare all the 'y' values to the min value after calling 'alignTop'.
I think this behavior is not what people would expect. I think think if you're aligning elements to 'the top', people think of 'the top' as 'the top of the page' not 'the top of the cluster of elements that I don't know where they are'.
That said, it's possible that people might want your behavior in some conditions. Maybe a 'relative=true/false' argument to the functions?
(for version 2; I think the current state of things is probably fine for now.)
If I set the layout size to 1000,1000, call autolayout, then align some element (i.e. 'alignTop'), sometimes the position of those elements is not in the appropriate swath of the layout: when I call 'alignTop', for example, nine times out of 10, the Y value is 30, and often it's in the 30's to 200's. But sometimes it's close to the middle, like '432'. I think that's too far off to really say that's at the 'top' of the layout; it's more like the hCenter.
One time, I got 'nan' values, which is also not ideal, but I don't know how to reliably get that to repeat.
The text was updated successfully, but these errors were encountered: