lume / kiwi

Fast TypeScript implementation of the Cassowary constraint solving algorithm (soon for AssemblyScript / WebAssembly).
https://codepen.io/trusktr/pen/abMLVxa
Other
154 stars 8 forks source link

Adds subscriptions to variables #8

Open theSherwood opened 9 months ago

theSherwood commented 9 months ago

I added subscribe and unsubscribe methods to Variable. I don't know if it would be better to subscribe to individual variables or en masse to Solver and get a list of changed variables. But this was straightforward. Thoughts?

For context, here's the link to an issue I opened about it: https://github.com/lume/kiwi/issues/6