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

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

Open fudgepop01 opened this issue 5 years ago • 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!

fudgepop01 avatar Apr 02 '19 13:04 fudgepop01

@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?

mreinstein avatar Apr 13 '19 17:04 mreinstein

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}.

cacaodev avatar Jun 13 '19 20:06 cacaodev