@euphrasiologist/lwphylo 1.2.10 → 1.2.11

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/index.js CHANGED
@@ -1291,6 +1291,7 @@ function drawPhylogeny(
1291
1291
  .scaleLinear()
1292
1292
  .domain([-scaleRadial, scaleRadial])
1293
1293
  .range([h, 0]);
1294
+
1294
1295
  const radiusPx = (r) => r * (w / (2 * scaleRadial));
1295
1296
 
1296
1297
  // ===== INDEXES / HELPERS =====
@@ -1475,7 +1476,7 @@ function drawPhylogeny(
1475
1476
 
1476
1477
  // label hover
1477
1478
  labels
1478
- .on("mouseenter", function(event, d) {
1479
+ .on("mouseenter", function(_event, d) {
1479
1480
  drawRadialPath(d, hoverLines, hoverArcs, hoverStroke, hoverWidth);
1480
1481
  d3.select(this).select("text").attr("font-weight", 600);
1481
1482
  })
@@ -1532,15 +1533,23 @@ function drawPhylogeny(
1532
1533
  if (a) {
1533
1534
  arcLayer
1534
1535
  .append("path")
1535
- .attr(
1536
- "d",
1537
- describeArc(
1538
- centerX,
1539
- centerY,
1540
- Math.max(0, radiusPx(a.radius)),
1541
- a.start,
1542
- a.end
1543
- )
1536
+ .attr("d", (d) =>
1537
+ d.sweep == null
1538
+ ? describeArc(
1539
+ centerX,
1540
+ centerY,
1541
+ radiusPx(d.radius),
1542
+ d.start,
1543
+ d.end
1544
+ )
1545
+ : describeArcSweep(
1546
+ centerX,
1547
+ centerY,
1548
+ radiusPx(d.radius),
1549
+ d.start,
1550
+ d.end,
1551
+ d.sweep
1552
+ )
1544
1553
  )
1545
1554
  .attr("fill", "none")
1546
1555
  .attr("stroke", stroke)