Skip to content

Commit ba86c18

Browse files
committed
🚧 re-focus on date range changes
1 parent dd35e7d commit ba86c18

File tree

1 file changed

+5
-2
lines changed
  • src/components/tree/reactD3Interface

1 file changed

+5
-2
lines changed

‎src/components/tree/reactD3Interface/change.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export const changePhyloTreeViaPropsComparison = (mainTree, phylotree, oldProps,
99

1010
/* zoom to a clade / reset zoom to entire tree */
1111
const zoomChange = oldTreeRedux.idxOfInViewRootNode !== newTreeRedux.idxOfInViewRootNode;
12-
12+
13+
const dateRangeChange = oldProps.dateMinNumeric !== newProps.dateMinNumeric ||
14+
oldProps.dateMaxNumeric !== newProps.dateMaxNumeric;
15+
1316
const filterChange = oldTreeRedux.filters !== newTreeRedux.filters;
1417

1518
/* do any properties on the tree object need to be updated?
@@ -60,7 +63,7 @@ export const changePhyloTreeViaPropsComparison = (mainTree, phylotree, oldProps,
6063
args.updateLayout = true;
6164
}
6265
/* re-focus on changes */
63-
else if (oldProps.focus && (zoomChange || filterChange)) {
66+
else if (oldProps.focus && (zoomChange || dateRangeChange || filterChange)) {
6467
args.newFocus = true;
6568
args.updateLayout = true;
6669
}

0 commit comments

Comments
 (0)