fix(ui): any positive room counts when a midpoint band asks for no minimum

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-18 23:26:22 -08:00
1 parent fd64a78aca
commit c1e58b72b9
1 file changed
+3 -3
+3 -3
View File
@@ -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;
}
/**