@euphrasiologist/lwphylo 1.2.8 → 1.2.10

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
@@ -573,8 +573,9 @@ function getChildArcs(pd) {
573
573
  */
574
574
  function radialLayout(node, opts = {}) {
575
575
  const {
576
- angleStrategy = "cmean",
577
- arcsStyle = "shortest",
576
+ // default fan
577
+ angleStrategy = "fan",
578
+ arcsStyle = "fan",
578
579
  openAngleDeg = 0,
579
580
  rotateDeg = 0
580
581
  } = opts;
@@ -1099,7 +1100,7 @@ function drawPhylogeny(
1099
1100
  const byId = new Map(horizontal.map((d) => [d.thisId, d]));
1100
1101
  const tipById = new Map(tips.map((d) => [d.thisId, d]));
1101
1102
  const tipByLabel = new Map(tips.map((d) => [d.thisLabel, d]));
1102
- const rootToTip = makeRootToTipGetter(byId, { prefer: "x1" });
1103
+ const rootToTip = makeRootToTipGetter(byId, { prefer: "x1" });
1103
1104
 
1104
1105
  const maxY = d3.max(horizontal, (d) => d.y1);
1105
1106
  const minY = d3.min(horizontal, (d) => d.y1);
@@ -1261,7 +1262,10 @@ function drawPhylogeny(
1261
1262
  return svg.node();
1262
1263
  } else if (layout === "radial") {
1263
1264
  const parsedTree = readTree(treeText);
1264
- const rad = radialLayout(parsedTree);
1265
+ const rad = radialLayout(parsedTree, {
1266
+ angleStrategy: "fan",
1267
+ arcsStyle: "fan"
1268
+ });
1265
1269
 
1266
1270
  // ===== MODE =====
1267
1271
  const TIP_MODE = radialMode; // "phylo" (shorten to original tips) or "outer" (project to one circle)