mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
fix(ui): a side of a midpoint block thinner than 8% of the window holds no panel; pin the lower merge edge
Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
378df7b613
commit
10dbd2f937
5 files changed
+22
-6
No files matched your search
@@ -390,6 +390,12 @@ test('HUD rail layout counts obstacles beside those across the midpoint', () =>
|
||||
// Neighbours exactly two gaps away leave no room between: one block, 100
|
||||
// to 400, and a tie (50px a side) goes above.
|
||||
assert.deepEqual(band([[100, 180], [200, 300], [320, 400]]), [40, 90]);
|
||||
// A neighbour exactly two gaps below joins it too: 150 to 300, 110px
|
||||
// above against 150 below.
|
||||
assert.deepEqual(band([[150, 250], [270, 300]]), [310, 460]);
|
||||
// A side under 8% of the window (38.4px) is no room: 30px above, none
|
||||
// below, so the band stays as it is.
|
||||
assert.deepEqual(band([[80, 455]]), [40, 460]);
|
||||
});
|
||||
|
||||
test('HUD rail layout keeps a band beside a midpoint obstacle inside its own edges', () => {
|
||||
|
||||
Reference in new issue
Block a user