From edc6cf1df907040141463ff2c4b82344032f1059 Mon Sep 17 00:00:00 2001 From: Jeran Date: Thu, 16 Jul 2026 21:26:54 +0200 Subject: [PATCH] forgot to scale --- src/components/plots/AxisLines.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/plots/AxisLines.tsx b/src/components/plots/AxisLines.tsx index 37894681..695af32c 100644 --- a/src/components/plots/AxisLines.tsx +++ b/src/components/plots/AxisLines.tsx @@ -79,7 +79,7 @@ const CubeAxis = ({flipX, flipY, flipDown}: {flipX: boolean, flipY: boolean, fli const depthRatio = useMemo(()=>shape.z/shape.x*timeScale,[shape, timeScale]); const shapeRatio = useMemo(()=>shape.y/shape.x, [shape]) - const timeRatio = Math.max(shape.z/shape.x, 2); + const timeRatio = useMemo(()=>Math.max(shape.z/shape.x * 2, 2),[shape]); const secondaryColor = useCSSVariable('--text-plot') //replace with needed variable const colorHex = useMemo(()=>{ @@ -101,7 +101,7 @@ const CubeAxis = ({flipX, flipY, flipDown}: {flipX: boolean, flipY: boolean, fli const zLine = useMemo(()=> { const geom = new LineSegmentsGeometry().setPositions([0, 0, isPC ? zRange[0]*globalScale*depthRatio-tickLength/2 : (zRange[0]*timeRatio-tickLength)/2, 0, 0, isPC ? zRange[1]*globalScale*depthRatio+tickLength/2 : (zRange[1]*timeRatio+tickLength)/2]); - return new LineSegments2(geom, lineMat)},[zRange, depthRatio, isPC, lineMat, globalScale]) + return new LineSegments2(geom, lineMat)},[zRange, depthRatio, isPC, lineMat, globalScale, timeRatio]) const tickLine = useMemo(()=> { const geom = new LineSegmentsGeometry().setPositions([0, 0, 0, 0, 0, tickLength]);