IjzerenHein / kiwi.js

Fast TypeScript implementation of the Cassowary constraint solving algorithm 🖖
Other
250 stars 24 forks source link

Implement updateConstant(constraint:Constraint, constant:number) #15

Open cacaodev opened 5 years ago

cacaodev commented 5 years ago

Currently, the only way to change the constant of an active constraint is to remove it and add a modified one. There should be a more efficient way to do this. This function should throw immediately an error if the constraint is required.

Here is an example of a working implementation of this feature (Swift port of Rhea).