Closed
Description
Migrated from WICG/spatial-navigation#122
Originally created by @frivoal on Wed, 17 Oct 2018 05:33:36 GMT
The current distance function behaves somewhat strangely, mostly due to:
- measuring edge to edge, which does not help decide which element to go to when two targets are at the same distance from the source's edge, even if one is fully in aligned, and the other is not
- The
B
factor in the formula penalizes elements which are aligned, in a way that is not fully compensated byC
. Both in combination seem to favor elements at 0 or 90 degrees over those at 45 degrees, which does not seem justified.
We should:
- Switch from measuring from edge to edge to measuring from center to edge
- Drop the B factor, and possibly the C factor as well.
Metadata
Metadata
Assignees
Labels
No labels