From c1e58b72b90cb99bfef069849aae11e1a890cf54 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 23:26:22 -0800 Subject: [PATCH] fix(ui): any positive room counts when a midpoint band asks for no minimum Co-authored-by: Manjunath Paparaju --- src/ui/panelRailGeometry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/panelRailGeometry.js b/src/ui/panelRailGeometry.js index c7266d8c72..0cc2f0db25 100644 --- a/src/ui/panelRailGeometry.js +++ b/src/ui/panelRailGeometry.js @@ -139,9 +139,9 @@ export function bandBesideMidpointObstacles({ }; const roomAbove = above.bottom - above.top; const roomBelow = below.bottom - below.top; - const least = Math.max(minimum, Number.EPSILON); - if (roomBelow > roomAbove && roomBelow >= least) return below; - return roomAbove >= least ? above : null; + const fits = (room) => room > 0 && room >= minimum; + if (roomBelow > roomAbove && fits(roomBelow)) return below; + return fits(roomAbove) ? above : null; } /**