Skip to content

Releases: bkrem/react-d3-tree

v3.3.2

08 Mar 20:36
Compare
Choose a tag to compare
  • Add centeringTransitionDuration prop to allow user to control time of transition. (#385, thank you @kalebm1) f7355dd

v3.3.1...v3.3.2

v3.3.1

06 Mar 12:34
Compare
Choose a tag to compare
  • fix: add centerNode to demo, fix 'horizontal' orientation bug for dimensions/centerNode behaviour (#384, thank you @kalebm1) c451295

v3.3.0...v3.3.1

v3.3.0

05 Mar 16:16
Compare
Choose a tag to compare

v3.2.1...v3.3.0

v3.2.1

19 Jan 21:42
Compare
Choose a tag to compare

Summary

  • Event handlers (onNodeClick, onNodeMouseOver, onNodeMouseOut) defined on Tree are now passed to the renderCustomNodeElement function as props by default (thank you @lucasdellabella)

Changeset

  • chore(ts): updates typings for CustomNodeElementProps a28e72c
  • Add handlers to custom node element (#372) d538b08

v3.2.0...v3.2.1

v3.2.0

20 Dec 18:39
Compare
Choose a tag to compare
  • docs: tweaks prop documentation for hasInteractiveNodes 38b2c4a
  • refactor(demo): simplifes MixedNodeInputElement example be623ac
  • fix(demo): fixes order of custom node element options 75c4b73
  • Add 'hasInteractiveNodes' prop to Tree that enables/disables d3 drag and pan handlers on foreignObject nodes (#370, thank you @chingmunn) cfec09a

v3.1.1...v3.2.0

v3.1.1

12 Jul 16:43
Compare
Choose a tag to compare
  • fix(types): moves @types/d3-hierarchy to prod deps (#357)

v3.1.0

25 Jun 13:12
Compare
Choose a tag to compare
  • feat: provide HierarchyPointNode for renderCustomNodeElement (#355, h/t @Joroze)

v3.0.0

24 Jun 16:39
Compare
Choose a tag to compare
  • refactor: aligns onNode handler parameter signatures with onLink handlers (#349)
    • BREAKING CHANGE: All top-level onNode handlers now pass node: HierarchyPointNode<TreeNodeDatum> as their first parameter instead of previous node: TreeNodeDatum.
    • This change affects the following event handlers: onNodeClick, onNodeMouseOver, onNodeMouseOut.
    • If you're currently using v2.x, you can preserve your existing handler behaviour in v3.x by simply accessing the data property on the passed node:
      • v2: onNodeClick={ (node, event) => { console.log(node) } }
      • v3: onNodeClick={ (node, event) => { console.log(node.data) } }
    • The change aligns Node handlers with those of Link, which already return HierarchyPointNode<TreeNodeDatum> for their sourceNode and targetNode parameters.
    • See the updated type definition for TreeNodeEventCallback for more details.

v2.0.4

23 Jun 18:33
Compare
Choose a tag to compare
  • fix(zoomable): allows for dragging without scaling if props.zoomable is set to false.
  • fix(ts): widens type for RawNodeDatum["attributes"] (#350)
    • attributes was made unintentionally restrictive during the v2 refactor to Typescript, by moving from a loose implicit object type to Record<string,string>.
    • This change widens the used Record type to additionally accept number and boolean primitives as possible values.
    • See the RawNodeDatum docs for more details.

v2.0.2

07 Jun 17:47
Compare
Choose a tag to compare
  • Fixes npm install failing on npm@7 without additional flags due to a peer dependency mismatch (#347)