@euphrasiologist/lwphylo 1.2.22 → 1.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drawPhylogeny.cjs +4 -8
- package/dist/drawPhylogeny.cjs.map +1 -1
- package/dist/drawPhylogeny.esm.js +4 -8
- package/dist/drawPhylogeny.esm.js.map +1 -1
- package/dist/drawPhylogeny.umd.js +1 -1
- package/dist/drawPhylogeny.umd.js.map +1 -1
- package/dist/index.cjs +4 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/drawPhylogeny.cjs
CHANGED
|
@@ -480,9 +480,6 @@ function getChildArcsFan(pd) {
|
|
|
480
480
|
const TAU = Math.PI * 2;
|
|
481
481
|
const norm = (t) => ((t % TAU) + TAU) % TAU;
|
|
482
482
|
|
|
483
|
-
const ccwDelta = (a0, a1) => (a1 - a0 + TAU) % TAU;
|
|
484
|
-
const cwDelta = (a0, a1) => (a0 - a1 + TAU) % TAU;
|
|
485
|
-
|
|
486
483
|
// Circular midpoint that travels CCW from a -> b by half the CCW span
|
|
487
484
|
function midCCW(a, b) {
|
|
488
485
|
const d = (b - a + TAU) % TAU; // CCW delta in [0, 2π)
|
|
@@ -531,14 +528,12 @@ function getChildArcsFan(pd) {
|
|
|
531
528
|
const cur = A[i];
|
|
532
529
|
const next = A[(i + 1) % N];
|
|
533
530
|
|
|
534
|
-
// “fan” wedge around the child: midpoint(prev→cur) .. midpoint(cur→next), CCW
|
|
535
531
|
const start = midCCW(prev.a, cur.a);
|
|
536
532
|
const end = midCCW(cur.a, next.a);
|
|
537
533
|
|
|
538
|
-
//
|
|
539
|
-
const
|
|
540
|
-
const
|
|
541
|
-
const sweep = ccw <= cw ? 0 : 1;
|
|
534
|
+
// Use SVG-conforming sweep logic
|
|
535
|
+
const delta = (end - start + TAU) % TAU;
|
|
536
|
+
const sweep = delta > Math.PI ? 0 : 1;
|
|
542
537
|
|
|
543
538
|
child_arcs.push({
|
|
544
539
|
parentId: pid,
|
|
@@ -549,6 +544,7 @@ function getChildArcsFan(pd) {
|
|
|
549
544
|
sweep
|
|
550
545
|
});
|
|
551
546
|
}
|
|
547
|
+
|
|
552
548
|
}
|
|
553
549
|
|
|
554
550
|
return child_arcs;
|