Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the sample working as expected? #15

Closed
arnaud-secondlayer opened this issue Nov 10, 2022 · 1 comment
Closed

Is the sample working as expected? #15

arnaud-secondlayer opened this issue Nov 10, 2022 · 1 comment

Comments

@arnaud-secondlayer
Copy link
Contributor

I tried the example in https://github.com/google/cassowary.dart/blob/master/example/main.dart .
I'm getting these results:

left: -0.0, right: 100.0
left: -50.0, mid: 0.0, right: 50.0

The first line of results looks ok.
However I don't understand why adding the midpoint Variable would change left to -50, therefore breaking the edgesPositive constraint.

I would have expected.

left: -0.0, mid: 50.0, right: 100.0

Maybe I'm missing something.

@arnaud-secondlayer
Copy link
Contributor Author

OK, I think by default Variables are set to 0 if suggestValueForVariable is not called.
Now I understand what it happening.

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

No branches or pull requests

1 participant