Re: [csswg-drafts] [css-nav-1] Predefined algorithm for spatial navigation (#3964)

Oh, my description was ambiguous. The way to calculate the distance for the `grid` value is different from the distance function in the spec, and it doesn't use the distance function.

For `grid` value, three factors are considered when we calculate the distance:
(1) The distance along the axis which corresponds to the direction of navigation
(2) The amount of alignment
(3) The Euclidean distance

If there are more than one aligned candidates in the navigation direction:
  - Among the aligned candidates, select the best one as a result of the calculation from (1)
  - In case of best candidates more than two, select the best one with the minimum (2).

Else if there isn't any aligned candidate in a given direction
   - Among other(not aligned) candidates, select the best ones as a result of calculation from (1)
   - In case of best candidates more than two, select the best one with the minimum (3).

Therefore, this won't affect the `orthogonalWeight` in the distance function.

-- 
GitHub Notification of comment by jihyerish
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3964#issuecomment-498694842 using your GitHub account

Received on Tuesday, 4 June 2019 14:25:29 UTC