Hello everyone! I'm new here, new to Cassowary.js, and new to programming with constraints in general. I'm wondering if someone here can help clarify a couple things for me.
Long story short, I'm having trouble understanding why the SimplexSolver seems to change variables at certain points in my code:
- Why do my variables change when constraints are added to the solver? (As opposed to waiting for 'resolve()' to be called.)
- Why do my edit variables revert to the value they had before being solved when I call 'endEdit'?
I'm not sure whether I'm misunderstanding something conceptually about Cassowary, or if I'm just confused about the correct usage of the library. Either way, I would appreciate some guidance.
I've put the simplest example of this behavior that I can muster into the following Gist:
Let me know if I can give any more details. Thanks for your help!
Matthew