diff --git a/src/components/tree/phyloTree/change.js b/src/components/tree/phyloTree/change.js index 77c2f120a..78fd96e1d 100644 --- a/src/components/tree/phyloTree/change.js +++ b/src/components/tree/phyloTree/change.js @@ -258,7 +258,6 @@ export const change = function change({ /* change these things to provided value (unless undefined) */ newDistance = undefined, newLayout = undefined, - newFocus = undefined, updateLayout = undefined, // todo - this seems identical to `newLayout` newBranchLabellingKey = undefined, showAllBranchLabels = undefined, @@ -271,6 +270,7 @@ export const change = function change({ tipRadii = undefined, branchThickness = undefined, /* other data */ + focus = undefined, scatterVariables = undefined }) { // console.log("\n** phylotree.change() (time since last run:", Date.now() - this.timeLastRenderRequested, "ms) **\n\n"); @@ -324,7 +324,7 @@ export const change = function change({ } if (changeNodeOrder) { - setDisplayOrder({nodes: this.nodes, focus: newFocus}); + setDisplayOrder({nodes: this.nodes, focus}); this.setDistance(); } @@ -361,7 +361,7 @@ export const change = function change({ /* distance */ if (newDistance || updateLayout) this.setDistance(newDistance); /* focus */ - if (updateLayout) setDisplayOrder({nodes: this.nodes, focus: newFocus}); + if (updateLayout) setDisplayOrder({nodes: this.nodes, focus}); /* layout (must run after distance and focus) */ if (newDistance || newLayout || updateLayout || changeNodeOrder) { this.setLayout(newLayout || this.layout, scatterVariables); diff --git a/src/components/tree/reactD3Interface/change.js b/src/components/tree/reactD3Interface/change.js index c5d1b43ba..67a3b6707 100644 --- a/src/components/tree/reactD3Interface/change.js +++ b/src/components/tree/reactD3Interface/change.js @@ -55,19 +55,19 @@ export const changePhyloTreeViaPropsComparison = (mainTree, phylotree, oldProps, /* explode! */ if (oldProps.explodeAttr !== newProps.explodeAttr) { args.changeNodeOrder = true; - args.newFocus = newProps.focus; + args.focus = newProps.focus; } /* enable/disable focus */ if (oldProps.focus !== newProps.focus) { - args.newFocus = newProps.focus; + args.focus = newProps.focus; args.updateLayout = true; } /* re-focus on changes */ else if (oldProps.focus === true && newProps.focus === true && (zoomChange || dateRangeChange || filterChange)) { - args.newFocus = true; + args.focus = true; args.updateLayout = true; }