mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-30 11:49:16 +00:00
perf(iso): ускорить точный граничный поиск (#585)
Issue: #585 User-Visible: no
This commit is contained in:
@@ -97,6 +97,14 @@ test('group collision separates a solvable dense set independently of input orde
|
||||
}
|
||||
assert.deepEqual(normal.placements.get(keys[0]).visualScene, [100, 100],
|
||||
'the stable first item stays at its zero-deviation anchor');
|
||||
|
||||
const hintedItems = [make('a'), make('b'), make('lock')].map((item) => ({
|
||||
...item,
|
||||
nudgeHintCss: normal.placements.get(isoOverlayCollisionKey(item.kind, item.id)).nudgeCss,
|
||||
}));
|
||||
const hinted = solve(hintedItems);
|
||||
for (const key of keys) assert.deepEqual(hinted.placements.get(key), normal.placements.get(key),
|
||||
'a previous exact placement is only an upper bound and cannot change the nearest result');
|
||||
});
|
||||
|
||||
test('group collision finds a legal one-pixel slit between the coarse nodes', () => {
|
||||
|
||||
Reference in New Issue
Block a user