@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/index.cjs
CHANGED
|
@@ -593,9 +593,6 @@ function getChildArcsFan(pd) {
|
|
|
593
593
|
const TAU = Math.PI * 2;
|
|
594
594
|
const norm = (t) => ((t % TAU) + TAU) % TAU;
|
|
595
595
|
|
|
596
|
-
const ccwDelta = (a0, a1) => (a1 - a0 + TAU) % TAU;
|
|
597
|
-
const cwDelta = (a0, a1) => (a0 - a1 + TAU) % TAU;
|
|
598
|
-
|
|
599
596
|
// Circular midpoint that travels CCW from a -> b by half the CCW span
|
|
600
597
|
function midCCW(a, b) {
|
|
601
598
|
const d = (b - a + TAU) % TAU; // CCW delta in [0, 2π)
|
|
@@ -644,14 +641,12 @@ function getChildArcsFan(pd) {
|
|
|
644
641
|
const cur = A[i];
|
|
645
642
|
const next = A[(i + 1) % N];
|
|
646
643
|
|
|
647
|
-
// “fan” wedge around the child: midpoint(prev→cur) .. midpoint(cur→next), CCW
|
|
648
644
|
const start = midCCW(prev.a, cur.a);
|
|
649
645
|
const end = midCCW(cur.a, next.a);
|
|
650
646
|
|
|
651
|
-
//
|
|
652
|
-
const
|
|
653
|
-
const
|
|
654
|
-
const sweep = ccw <= cw ? 0 : 1;
|
|
647
|
+
// Use SVG-conforming sweep logic
|
|
648
|
+
const delta = (end - start + TAU) % TAU;
|
|
649
|
+
const sweep = delta > Math.PI ? 0 : 1;
|
|
655
650
|
|
|
656
651
|
child_arcs.push({
|
|
657
652
|
parentId: pid,
|
|
@@ -662,6 +657,7 @@ function getChildArcsFan(pd) {
|
|
|
662
657
|
sweep
|
|
663
658
|
});
|
|
664
659
|
}
|
|
660
|
+
|
|
665
661
|
}
|
|
666
662
|
|
|
667
663
|
return child_arcs;
|