Skip to content

Commit b792bd9

Browse files
committed
Correct sweep flag.
1 parent f7887e9 commit b792bd9

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

d3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7939,13 +7939,13 @@
79397939
cr = r0 < r1 ^ cw ? 0 : 1;
79407940
if (x1 != null) {
79417941
var rc1 = Math.min(rc, r1 / (1 / Math.sin(d1 / 2) + 1)), t30 = d3_svg_arcCornerTangents(x3 == null ? [ x2, y2 ] : [ x3, y3 ], [ x0, y0 ], r1, rc1), t12 = d3_svg_arcCornerTangents(x1 == null ? [ x0, y0 ] : [ x1, y1 ], [ x2, y2 ], r1, rc1);
7942-
path.push("M", t30[0], "A", rc1, ",", rc1, " 0 0,", cr, " ", t30[1], "A", r1, ",", r1, " 0 ", l1, ",", cw, " ", t12[1], "A", rc1, ",", rc1, " 0 0,", cr, " ", t12[0]);
7942+
path.push("M", t30[0], "A", rc1, ",", rc1, " 0 0,", cr, " ", t30[1], "A", r1, ",", r1, " 0 ", d3_svg_arcSweep(t30[1][0], t30[1][1], t12[1][0], t12[1][1]), ",", cw, " ", t12[1], "A", rc1, ",", rc1, " 0 0,", cr, " ", t12[0]);
79437943
} else {
79447944
path.push("M", x0, ",", y0);
79457945
}
79467946
if (x3 != null) {
79477947
var rc0 = Math.min(rc, r0 / (1 / Math.sin(d0 / 2) + 1)), t03 = d3_svg_arcCornerTangents([ x0, y0 ], x3 == null ? [ x2, y2 ] : [ x3, y3 ], r0, -rc0), t21 = d3_svg_arcCornerTangents([ x2, y2 ], x1 == null ? [ x0, y0 ] : [ x1, y1 ], r0, -rc0);
7948-
path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t21[1], "A", r0, ",", r0, " 0 ", l0, ",", 1 - cw, " ", t03[1], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]);
7948+
path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t21[1], "A", r0, ",", r0, " 0 ", 1 - d3_svg_arcSweep(t21[1][0], t21[1][1], t03[1][0], t03[1][1]), ",", 1 - cw, " ", t03[1], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]);
79497949
} else {
79507950
path.push("L", x2, ",", y2);
79517951
}

0 commit comments

Comments
 (0)