@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/drawPhylogeny.cjs
CHANGED
|
@@ -66,6 +66,13 @@ const TAU$1 = Math.PI * 2;
|
|
|
66
66
|
const norm$1 = (t) => ((t % TAU$1) + TAU$1) % TAU$1;
|
|
67
67
|
|
|
68
68
|
function describeArcSweep(cx, cy, r, a0, a1, sweep /*0=CCW,1=CW*/) {
|
|
69
|
+
console.log("describeArcSweep input:", {
|
|
70
|
+
cx, cy, r,
|
|
71
|
+
a0Deg: (a0 * 180 / Math.PI).toFixed(2),
|
|
72
|
+
a1Deg: (a1 * 180 / Math.PI).toFixed(2),
|
|
73
|
+
sweep
|
|
74
|
+
});
|
|
75
|
+
|
|
69
76
|
const delta = sweep === 0 ? norm$1(a1 - a0) : norm$1(a0 - a1);
|
|
70
77
|
if (!(r > 0) || delta < 1e-9) return "";
|
|
71
78
|
const largeArcFlag = delta > Math.PI ? 1 : 0;
|
|
@@ -547,8 +554,6 @@ function getChildArcsFan(pd) {
|
|
|
547
554
|
return child_arcs;
|
|
548
555
|
}
|
|
549
556
|
|
|
550
|
-
// src/radial/radialLayout.js
|
|
551
|
-
|
|
552
557
|
/**
|
|
553
558
|
* radialLayout(node, opts?)
|
|
554
559
|
* opts:
|
|
@@ -594,7 +599,7 @@ function radialLayout(node, opts = {}) {
|
|
|
594
599
|
|
|
595
600
|
// per-child arcs for half-arc highlighting if you already use them
|
|
596
601
|
let child_arcs = [];
|
|
597
|
-
if (
|
|
602
|
+
if (arcsStyle === "fan") {
|
|
598
603
|
child_arcs = getChildArcsFan(pd);
|
|
599
604
|
} else {
|
|
600
605
|
child_arcs = getChildArcs(pd);
|
|
@@ -1455,7 +1460,10 @@ function drawPhylogeny(
|
|
|
1455
1460
|
lineLayer.selectAll("*").remove();
|
|
1456
1461
|
arcLayer.selectAll("*").remove();
|
|
1457
1462
|
|
|
1458
|
-
let cur = typeof target === "number"
|
|
1463
|
+
let cur = (typeof target === "number" || typeof target === "string")
|
|
1464
|
+
? byId.get(target)
|
|
1465
|
+
: target;
|
|
1466
|
+
|
|
1459
1467
|
if (!cur) return;
|
|
1460
1468
|
|
|
1461
1469
|
let first = true;
|
|
@@ -1494,6 +1502,14 @@ function drawPhylogeny(
|
|
|
1494
1502
|
}
|
|
1495
1503
|
|
|
1496
1504
|
if (a) {
|
|
1505
|
+
console.log("Drawing arc:", {
|
|
1506
|
+
childId: cur.thisId,
|
|
1507
|
+
startDeg: (a.start * 180 / Math.PI).toFixed(2),
|
|
1508
|
+
endDeg: (a.end * 180 / Math.PI).toFixed(2),
|
|
1509
|
+
sweep: a.sweep,
|
|
1510
|
+
radius: a.radius
|
|
1511
|
+
});
|
|
1512
|
+
|
|
1497
1513
|
arcLayer
|
|
1498
1514
|
.append("path")
|
|
1499
1515
|
.attr("d", pathFromArcRecord(a))
|