diff --git a/frontend/src/components/game-of-life/RectangleOverlays.tsx b/frontend/src/components/game-of-life/RectangleOverlays.tsx index d238d5e..05c47e0 100644 --- a/frontend/src/components/game-of-life/RectangleOverlays.tsx +++ b/frontend/src/components/game-of-life/RectangleOverlays.tsx @@ -24,12 +24,15 @@ function createCombinedRectangleOverlay( ): JSX.Element { const width = (initialRect.x_range.end - initialRect.x_range.start) * cellSize; const height = (initialRect.y_range.end - initialRect.y_range.start) * cellSize; - const fontSize = Math.max(11, Math.min(14, Math.min(width, height) / 10)); + const fontSize = Math.max(11, Math.min(16, Math.min(width, height) / 8)); + + // Determine if the area is too small for text inside + const isSmallArea = width < 100 || height < 40; return (