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

Make better algorithm to find constraints #4

Closed
o-nnerb opened this issue Mar 4, 2020 · 3 comments
Closed

Make better algorithm to find constraints #4

o-nnerb opened this issue Mar 4, 2020 · 3 comments

Comments

@o-nnerb
Copy link

o-nnerb commented Mar 4, 2020

When using the find method, EasyAnchor should lookup for constraints that are equal to the properties inside Anchor.

For example, I have set the anchor edges; width equal to height. To find the top constraint, I count use something like that anchor.top.find. In a scenario that there are a lot of constraints related to top, I could specify more attributes to find it like anchor.top.priority(750).constant(10)

@onmyway133
Copy link
Owner

@brennobemoura Hi, good point, would you like to make a PR? Another way is to just get a list of constraints from the view and filter

@o-nnerb
Copy link
Author

o-nnerb commented Mar 7, 2020

I have already implemented, now I am testing

@o-nnerb
Copy link
Author

o-nnerb commented Mar 31, 2020

See PR #5

@o-nnerb o-nnerb closed this as completed Apr 7, 2020
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

2 participants