slightlyoff / cassowary.js

Cassowary/JS, better, faster, future-ready
Other
1.69k stars 107 forks source link

making it easier to debug #70

Open kevinbarabash opened 9 years ago

kevinbarabash commented 9 years ago

I was trying to figure out how to update the value of a stay so I thought I'd require the ../cassowary/src/c.js or ../cassowary/index.js. I added cassowary.js as a submodule and the paths are working fine. The only problem is that webpack doesn't understand the module pattern that's being used. I was thinking of refactoring the modules and using browserify or webpack as the build system. Thoughts?

Also, how does one update the value of a stay?

kevinbarabash commented 9 years ago

Answering my own question about the stay, you do the following:

solver.addEditVar(stayVar);
solver.suggestValue(stayVar, newValue);
solver.resolve();