@euphrasiologist/lwphylo 1.2.20 → 1.2.22
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 +20 -4
- package/dist/drawPhylogeny.cjs.map +1 -1
- package/dist/drawPhylogeny.esm.js +20 -4
- 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 +20 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -179,6 +179,13 @@ const TAU$1 = Math.PI * 2;
|
|
|
179
179
|
const norm$1 = (t) => ((t % TAU$1) + TAU$1) % TAU$1;
|
|
180
180
|
|
|
181
181
|
function describeArcSweep(cx, cy, r, a0, a1, sweep /*0=CCW,1=CW*/) {
|
|
182
|
+
console.log("describeArcSweep input:", {
|
|
183
|
+
cx, cy, r,
|
|
184
|
+
a0Deg: (a0 * 180 / Math.PI).toFixed(2),
|
|
185
|
+
a1Deg: (a1 * 180 / Math.PI).toFixed(2),
|
|
186
|
+
sweep
|
|
187
|
+
});
|
|
188
|
+
|
|
182
189
|
const delta = sweep === 0 ? norm$1(a1 - a0) : norm$1(a0 - a1);
|
|
183
190
|
if (!(r > 0) || delta < 1e-9) return "";
|
|
184
191
|
const largeArcFlag = delta > Math.PI ? 1 : 0;
|
|
@@ -660,8 +667,6 @@ function getChildArcsFan(pd) {
|
|
|
660
667
|
return child_arcs;
|
|
661
668
|
}
|
|
662
669
|
|
|
663
|
-
// src/radial/radialLayout.js
|
|
664
|
-
|
|
665
670
|
/**
|
|
666
671
|
* radialLayout(node, opts?)
|
|
667
672
|
* opts:
|
|
@@ -707,7 +712,7 @@ function radialLayout(node, opts = {}) {
|
|
|
707
712
|
|
|
708
713
|
// per-child arcs for half-arc highlighting if you already use them
|
|
709
714
|
let child_arcs = [];
|
|
710
|
-
if (
|
|
715
|
+
if (arcsStyle === "fan") {
|
|
711
716
|
child_arcs = getChildArcsFan(pd);
|
|
712
717
|
} else {
|
|
713
718
|
child_arcs = getChildArcs(pd);
|
|
@@ -1622,7 +1627,10 @@ function drawPhylogeny(
|
|
|
1622
1627
|
lineLayer.selectAll("*").remove();
|
|
1623
1628
|
arcLayer.selectAll("*").remove();
|
|
1624
1629
|
|
|
1625
|
-
let cur = typeof target === "number"
|
|
1630
|
+
let cur = (typeof target === "number" || typeof target === "string")
|
|
1631
|
+
? byId.get(target)
|
|
1632
|
+
: target;
|
|
1633
|
+
|
|
1626
1634
|
if (!cur) return;
|
|
1627
1635
|
|
|
1628
1636
|
let first = true;
|
|
@@ -1661,6 +1669,14 @@ function drawPhylogeny(
|
|
|
1661
1669
|
}
|
|
1662
1670
|
|
|
1663
1671
|
if (a) {
|
|
1672
|
+
console.log("Drawing arc:", {
|
|
1673
|
+
childId: cur.thisId,
|
|
1674
|
+
startDeg: (a.start * 180 / Math.PI).toFixed(2),
|
|
1675
|
+
endDeg: (a.end * 180 / Math.PI).toFixed(2),
|
|
1676
|
+
sweep: a.sweep,
|
|
1677
|
+
radius: a.radius
|
|
1678
|
+
});
|
|
1679
|
+
|
|
1664
1680
|
arcLayer
|
|
1665
1681
|
.append("path")
|
|
1666
1682
|
.attr("d", pathFromArcRecord(a))
|