IjzerenHein/kiwi.js

a few features of cassowary that cannot be found (at a glance)

fudgepop01 opened this issue · 2 comments

As seen in this issue thread at the WebAssemblyStudio repo, one of the contributors was unable to find an equivalent to the following functions of cassorwary:

I was wondering if there exists replacements in the Kiwijs API that I'm not seeing. I'm personally looking for an equivalent to Cassowary.Equation(...).

Thanks!

@dar2355 Cassowary.Equation and Cassowary.Inequality provide equivalent functionality to Kiwi.Constraint.

As for stays, to be honest I'm not really sure what these are. Anyone else know?

In Cassowary, stay constraints force the variable they hold to "stick" to their value with a given weight. But 1/ I found them to be buggy and 2/ they can be easily replaced with the concept of "intrinsic content size" introduced by Cocoa Autolayout.
For example, instead of having a stay constraint x = 2 {weight}, you can define two constraints
x >= 2 {weight} and x<=2 {weight}.