From b3e924b14284a72b6caccb42ad12111a20384af4 Mon Sep 17 00:00:00 2001 From: james hadfield Date: Wed, 26 Feb 2020 13:25:53 +1300 Subject: [PATCH] [bugfix] fix temporal scales for second trees Closes #903 --- src/components/tree/phyloTree/grid.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/tree/phyloTree/grid.js b/src/components/tree/phyloTree/grid.js index aa9cffa1d..cb93c36dc 100644 --- a/src/components/tree/phyloTree/grid.js +++ b/src/components/tree/phyloTree/grid.js @@ -134,9 +134,8 @@ const computeXGridPoints = (xmin, xmax, layout, distanceMeasure, minorTicks, pxA /* step is the amount (same units of xmax, xmin) of seperation between major grid lines */ const [step, minorStep] = distanceMeasure === "num_date" ? - calculateMajorGridSeperationForTime(xmax-xmin, pxAvailable) : + calculateMajorGridSeperationForTime(xmax-xmin, Math.abs(pxAvailable)) : calculateMajorGridSeperationForDivergence(xmax-xmin, minorTicks); - const gridMin = Math.floor(xmin/step)*step; const minVis = layout==="radial" ? xmin : gridMin; const maxVis = xmax;