archaeopteryx 3.6.0 → 3.6.1

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/archaeopteryx.js CHANGED
@@ -20,7 +20,7 @@
20
20
  *
21
21
  */
22
22
 
23
- // v 3.6.0
23
+ // v 3.6.1
24
24
  // 2026-09-10
25
25
  //
26
26
  // Archaeopteryx.js is a software tool for the visualization and
@@ -103,7 +103,7 @@ function (root, d3, forester, phyloXml) {
103
103
  // IIFE's own function name -- a plain object says what it is.)
104
104
  let archaeopteryx = {};
105
105
 
106
- const VERSION = '3.6.0';
106
+ const VERSION = '3.6.1';
107
107
  const WEBSITE = 'https://cmzmasek.github.io/archaeopteryx-js/';
108
108
  const DESKTOP_WEBSITE = 'https://cmzmasek.github.io/archaeopteryx/';
109
109
  const SOURCE_WEBSITE = 'https://github.com/cmzmasek/archaeopteryx-js';
@@ -5724,6 +5724,11 @@ function (root, d3, forester, phyloXml) {
5724
5724
  _baseSvg = d3.select(containerEl).append('svg')
5725
5725
  .attr('width', _displayWidth)
5726
5726
  .attr('height', _displayHeight)
5727
+ // an inline svg sits on a text baseline, and the room left
5728
+ // under it for descenders makes a container sized to the
5729
+ // svg a few pixels taller than the svg itself -- enough to
5730
+ // make a full-window page scroll
5731
+ .style('display', 'block')
5727
5732
  .call(_zoomListener)
5728
5733
  // d3.zoom binds its own double-click-to-zoom, which scales the
5729
5734
  // picture -- fonts and all -- and so behaves like the wheel
@@ -13290,6 +13295,22 @@ function (root, d3, forester, phyloXml) {
13290
13295
  holder.style.top = '0';
13291
13296
  holder.appendChild(el);
13292
13297
  document.body.appendChild(holder);
13298
+ // jsPDF's built-in faces come in two weights only: svg2pdf passes any
13299
+ // other (the legend titles' 600) on as a style Helvetica lacks, and
13300
+ // jsPDF then falls back to Times -- snap every weight to one of the two.
13301
+ // Those faces also encode only WinAnsi, where '≤' and '≥' come out as
13302
+ // spaced-out garbage, so the ones the viewer draws itself are spelled out.
13303
+ el.querySelectorAll('text, tspan').forEach(function (t) {
13304
+ let weight = parseInt(window.getComputedStyle(t).fontWeight, 10);
13305
+ if (weight !== 400 && weight !== 700) {
13306
+ t.style.fontWeight = weight >= 600 ? 'bold' : 'normal';
13307
+ }
13308
+ t.childNodes.forEach(function (c) {
13309
+ if (c.nodeType === Node.TEXT_NODE && /[≤≥]/.test(c.nodeValue)) {
13310
+ c.nodeValue = c.nodeValue.replace(/≤/g, '<=').replace(/≥/g, '>=');
13311
+ }
13312
+ });
13313
+ });
13293
13314
  let svgEl = treeSvgElement();
13294
13315
  let w = (svgEl && svgEl.width.baseVal.value) || _displayWidth;
13295
13316
  let h = (svgEl && svgEl.height.baseVal.value) || _displayHeight;
package/forester.js CHANGED
@@ -20,7 +20,7 @@
20
20
  *
21
21
  */
22
22
 
23
- // v 3.6.0
23
+ // v 3.6.1
24
24
  // 2026-09-10
25
25
  //
26
26
  // forester.js is a general suite for dealing with phylogenetic trees.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archaeopteryx",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "Archaeopteryx.js is a software tool for the visualization and analysis of highly annotated phylogenetic trees.",
5
5
  "main": "archaeopteryx.js",
6
6
  "types": "archaeopteryx.d.ts",