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 making so if the offset x/y change, the left and top must change (theoretically)
Changing the width and height works well too, the right and bottom edges resize as needed and the top and left edges remain in place. This is because the constraints are satisfied well.
To get width/height to work, we add the following constraints:
This is making so if the width or height change, the right and bottom edges must change (theoretically).
The offset, width and height may change, when they do, the solver rebuilds the constraints with the updated values.
However, if you resize from the top left corner, or the top corner, or the left corner, you will translate the box instead of resize + change top/left. I expected the translation constraints to run, finish, then the sizing constraints to run, then finish, but clearly that's not what's happening. So I was wondering what flaw exists in my logic when thinking about this.
I wanted to translate, and then resize, not simutaeniously. Should I flush translation first then flush resize second to enforce an order?
My best guess is that Stays have not been implemented here and the solver is forcing the equation by changing the width and height variables, which are unused. Like if Stays existed, I would've set width/height to stayed values so they don't change.
The text was updated successfully, but these errors were encountered:
I don't fully understand the algorithm, I was merely resurrecting it from Flutter's Git history.
To fully understand the algorithm's actions in your use case I'd suggest writing lots of test cases and seeing how it performs. The scientific discovery approach, if you will.
Hello, I've been exploring the library and it's been great, however I was wondering if I could get help building constraints for a specific case.
Imagine I make a box. It's easy to add constraints for a normal box, it would just look something like
This is just describing a solid box. I set the right/bottom/centerX/centerY to strong because other constraints may want to modify the size later on.
For translating the top and left position, we just do
This is making so if the offset x/y change, the left and top must change (theoretically)
Changing the width and height works well too, the right and bottom edges resize as needed and the top and left edges remain in place. This is because the constraints are satisfied well.
To get width/height to work, we add the following constraints:
This is making so if the width or height change, the right and bottom edges must change (theoretically).
The offset, width and height may change, when they do, the solver rebuilds the constraints with the updated values.
However, if you resize from the top left corner, or the top corner, or the left corner, you will translate the box instead of resize + change top/left. I expected the translation constraints to run, finish, then the sizing constraints to run, then finish, but clearly that's not what's happening. So I was wondering what flaw exists in my logic when thinking about this.
I wanted to translate, and then resize, not simutaeniously. Should I flush translation first then flush resize second to enforce an order?
My best guess is that Stays have not been implemented here and the solver is forcing the equation by changing the width and height variables, which are unused. Like if Stays existed, I would've set width/height to stayed values so they don't change.
The text was updated successfully, but these errors were encountered: