[fxtf-drafts] [motion-1] the description of contain flag in ray() function (#363)

BorisChiou has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [motion-1] the description of contain flag in ray() function ==
This is more like a question than an issue. I'm working on `offset-path: ray()`, and the definition of `contain` is a little bit not clear enough to me.
Per the spec:
> The used value of offset-distance is clamped so that the box is entirely contained within the path.
> If no offset-distance would lead to the box being enclosed by the path, the path size is minimally increased so that such an offset-distance exists.

For examples: if the box size is `100px x 100px`.
1. If the `offset-anchor` is within the box, e.g. `50% 50%`
    1. Assume the path length is long enough to enclose all the box (i.e. larger than 100px):
        * `offset-distance` is 0%, so part of the box is not contained within the path. In this case, do we have to move the box forward (i.e. 50px) to make sure all box is entirely contained within the path? (_I guess the answer is yes._)
        * `offset-distance` is 100%. This case is clear, so we just move the box backward (i.e. 50px) to make sure all box is entirely contained within the path.
    2. Assuem the path length is not long enough to enclose the path (i.e. less than 100px):
        * `offset-distance` is 0%, so part of the box is not contained within the path. We have to increase the path length to 100px. The question is which direction should we use to increase the path? For example, increase the tail, so we have enough space to move the box forward?
        * `offset-distance` is 100%. Same case, just increase the tail of the path to make sure the path size is 100px, right?
2. If the `offset-anchor` is outside the box, e.g. `200% -300%`
    * What is the definition of *the box is entirely contained within the path*? the box is outside the path already because the anchor point is outside the box. 

Thanks. cc @ericwilligers 

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/363 using your GitHub account

Received on Friday, 9 August 2019 20:49:04 UTC