Skip to content

Commit f24379f

Browse files
authored
vis: tree display: fix balancer nodes not spanning the entire height they should (#1510)
1 parent 462fd0c commit f24379f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ott-vis-panel/src/components/TreeDisplay.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const TreeDisplay: React.FC<TreeDisplayProps> = ({ systemState, width, height })
221221
// but also guarenteeing that they don't overlap with each other or the monoliths with some padding
222222
const fullHeight = monolithTreeYs[monolithTreeYs.length - 1];
223223
const lerp = d3.interpolateNumber(0, fullHeight);
224-
const lerpincr = 1 / systemState.length;
224+
const lerpincr = 1 / (systemState.length - 1);
225225
const yincr = Math.max(lerp(lerpincr), NODE_RADIUS * 2 + 20);
226226
const balancerNodes = systemState.map((balancer, i) => {
227227
const node: BalancerNode = {

0 commit comments

Comments
 (0)