diff --git a/src/components/tree/phyloTree/types.ts b/src/components/tree/phyloTree/types.ts index 3ed139188..bbecb581f 100644 --- a/src/components/tree/phyloTree/types.ts +++ b/src/components/tree/phyloTree/types.ts @@ -35,7 +35,7 @@ export interface Regression { // ---------- Callbacks ---------- // -type NodeCallback = (d: PhyloNode) => void +type NodeCallback = (d: PhyloNode) => void // See export interface Callbacks { onBranchClick: NodeCallback diff --git a/src/components/tree/reactD3Interface/callbacks.ts b/src/components/tree/reactD3Interface/callbacks.ts index e9c11804f..50968c875 100644 --- a/src/components/tree/reactD3Interface/callbacks.ts +++ b/src/components/tree/reactD3Interface/callbacks.ts @@ -61,7 +61,9 @@ export const onBranchClick = function onBranchClick(this: TreeComponent, d: Phyl if (this.props.narrativeMode) return; /* if a branch was clicked while holding the shift key, we instead display a node-clicked modal */ - if (window.event instanceof KeyboardEvent && window.event.shiftKey) { + /* NOTE: window.event is deprecated, however the version of d3-selection we're using doesn't supply + the event as an argument */ + if (window.event instanceof PointerEvent && window.event.shiftKey) { // no need to dispatch a filter action this.props.dispatch({type: SELECT_NODE, name: d.n.name, idx: d.n.arrayIdx, isBranch: true, treeId: d.that.id}) return;