Repository navigation
v2.6.1 - edge-styler crash fix, selection fixes and TypeScript accuracy
What's Changed
Bug fixes
edge-stylerno longer crashes after a selection change (branch click, node menu, brush). This had been present since 1.0.0. (#525, fixes #522 and #524)- Node
<g>elements now getnode-selected,node-collapsedandnode-taggedclasses on every update, and stale classes are removed. (#533) - The
css-classesoption andcss()now apply only to the tree they are called on, instead of every tree on the page. (#533) - "Hide this subtree" now hides the whole subtree. Hiding a node through
modifySelection(…, "notshown", …)hides its descendants too, instead of leaving them drawn with coordinates that grew on every update. (#533) binary-selectable: trueno longer throws on every selection change, and it honoursmode. (#533)multi-setselection membership is now keyed by node, so unnamed or duplicate-named nodes no longer share membership. (#533)- Removed a dead
node_stylerblock fromrefresh(). (#528)
TypeScript
phylotree.d.tsnow matches the runtime API:style_nodes/style_edges, the full set of render options includingedge-styler,modifySelection's real signature, and a type-onlyTreeRender. It now type-checks withskipLibCheck: false.@types/d3is now a dependency, because the declarations import d3's types. (#533)
Packaging and tooling
- The package declares
engines.node >= 20, which itscommander@14dependency already required. (#533) dist/phylotree-menus.cssis now included in the package. (#533)prepublishOnlybuilds and tests before publishing. (#533)yarn test,serveand thedocs:*scripts now work on Windows.docs:watchanddocs:validatework again. (#529, #531, #533)- CI runs on Windows as well as Linux, and type-checks the declarations. (#533)
- Live demo: https://veg.github.io/phylotree.js/. Every pull request now gets a preview deploy. (#534, #535, #536)
Dependency updates
- fast-xml-parser 5.5.7 → 5.7.0 (#516), fast-xml-builder → 1.3.1 (#517), markdown-it 14.2.0 (#518), js-yaml 4.3.0 (#519).
- Earlier bumps since 2.6.0: rollup (#506), underscore (#507), fast-xml-parser (#511), flatted (#512), handlebars (#513), lodash (#514), follow-redirects (#515).
Behaviour changes to be aware of
- Selected, collapsed and tagged nodes now actually receive their CSS classes, so the existing rules in
phylotree.cssstart to apply. - Code that relied on one tree's
css()restyling other trees no longer works that way.
Thanks to @YehyaBELHAMRA for the detailed reports and fixes behind #524–#532.
Full Changelog: v2.6.0...v2.6.1