Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

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

Open
fudgepop01 opened this issue Apr 2, 2019 · 2 comments
Open

Comments

@fudgepop01
Copy link

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!

@mreinstein
Copy link

mreinstein commented Apr 13, 2019

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

@cacaodev
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants