You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0, "0"(edited), undefined, false => draws a clockwise arc
1, "1", true => draws an anticlockwise arc
So far so good, but trying with anticlockwise = "anticlockwise" or anticlockwise = 3 (or most other truthy values) will give a very weird path with an inverted curvature, because it will have both ccw truthy, and cw = 1.
I don't think the code should be fixed as this is probably the fastest approach, but maybe the documentation?
Currently we say
If anticlockwise is true, the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction
"otherwise" could be changed to "if false or undefined", or "if false"…
Another possibility:
If anticlockwise, a boolean, is true, the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction.
(I got bitten by using a checkbox’s value, which gave me anticlockwise="On".)
Fil
changed the title
document path.arc(…anticlockwise) must be true or 1, not true-ish
path.arc(…anticlockwise) must be true or 1, not true-ish
May 13, 2019
Fil
added a commit
that referenced
this issue
Jun 6, 2019
We have
cw = 1 ^ ccw
"0"(edited), undefined, false => draws a clockwise arcSo far so good, but trying with anticlockwise = "anticlockwise" or anticlockwise = 3 (or most other truthy values) will give a very weird path with an inverted curvature, because it will have both ccw truthy, and cw = 1.
I don't think the code should be fixed as this is probably the fastest approach, but maybe the documentation?
Currently we say
"otherwise" could be changed to "if false or undefined", or "if false"…
Another possibility:
(I got bitten by using a checkbox’s value, which gave me anticlockwise="On".)
See interactive test at https://observablehq.com/d/d8c04cb491a6c444
The text was updated successfully, but these errors were encountered: