From 5a1744ebb64f31b8c2313356fed8ec2dc7283ae0 Mon Sep 17 00:00:00 2001 From: Isaac Easton Date: Tue, 10 Jan 2023 14:17:36 -0500 Subject: [PATCH 1/2] add keydown handler to expand button --- src/d3-org-chart.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/d3-org-chart.js b/src/d3-org-chart.js index 58f5a7f..871f2d8 100644 --- a/src/d3-org-chart.js +++ b/src/d3-org-chart.js @@ -849,7 +849,12 @@ export class OrgChart { selector: "node-button-g", data: (d) => [d] }) - .on("click", (event, d) => this.onButtonClick(event, d)); + .on("click", (event, d) => this.onButtonClick(event, d)) + .on("keydown", (event, d) => { + if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') { + this.onButtonClick(event, d) + } + }); nodeButtonGroups.patternify({ tag: 'rect', From c8ebb0490ecfcf1424c16a8528a4a835d3efde53 Mon Sep 17 00:00:00 2001 From: bumbeishvili Date: Thu, 12 Jan 2023 10:29:54 +0400 Subject: [PATCH 2/2] 2.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83976e3..00aaa3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d3-org-chart", - "version": "2.6.1", + "version": "2.7.0", "module": "index", "description": "Highly customizable org chart, created with d3", "keywords": [