-
Notifications
You must be signed in to change notification settings - Fork 93
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
Wrong decision on distance measurement SpatialNavigation.ts : getSecondaryAxisDistance() #134
Comments
@a-roz: Hello! You're quite right, the current comparison can be somewhat incorrect due to the way it compares using the corners. We're discussing making it possible to define this in some way, for example by making it possible to overwrite this distance comparison function, so that you can define the origins you want to compare yourself. The current approach is more performant for uniformly sized elements, so I think having some option for some customization would be good here, for those who could benefit from it. Thanks for the feedback. We'll get back to this topic over the summer. |
SpatialNavigation.ts
has getSecondaryAxisDistance() , which has logically incorrect behavior when measure distance between Ref an Sibling
it's done by measure on all corners and leads to wrong choose in case of elements of a VARIOUS WIDTH / HEIGHT
To correct this, have to use CENTER coordinate between corners and measure the distance between them
so instead of
simply to put
and it works perfect
The text was updated successfully, but these errors were encountered: