cassowary.js icon indicating copy to clipboard operation
cassowary.js copied to clipboard

Mutable constant, Strength&weight in Constraint.

Open cacaodev opened this issue 10 years ago • 1 comments

Currently, the only way to change the strength or constant in a Constraint is to replace a constraint with a new one with new values.

In a constraint-based UI, the only way to change the size or position of an element is to change the constant of the constraint managing the layout. This is why changing a constant should be simple and efficient.

FYI, set_constant is implemented in a branch of rhea : https://github.com/Nocte-/rhea/blob/0.3/rhea/simplex_solver.cpp#L188

cacaodev avatar Feb 14 '15 16:02 cacaodev

I like this a lot better than the add/remove churn. We should do this.

slightlyoff avatar Feb 16 '15 12:02 slightlyoff