mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 10:42:22 +00:00
Merge remote-tracking branch 'origin/main' into german/cctv-camera-counts
# Conflicts: # src/layers/cctv/lifecycle.test.mjs
This commit is contained in:
commit
2b7a6b0c63
1463 files changed
+48705
-10313
No files matched your search
@@ -1941,6 +1941,25 @@ test('paint rectangles publish from a pool and topmost interactive lookup wins',
|
||||
env.cleanup();
|
||||
});
|
||||
|
||||
test('hit rectangles stay what is painted until the next paint, through a republish in the same click', () => {
|
||||
const env = installMockEnvironment();
|
||||
initWorldOverlay(env.viewer);
|
||||
setOverlayEntries('cards', [selectedEntry('card', { interactive: true })]);
|
||||
env.postRender.raise();
|
||||
assert.equal(hitTestWorldOverlay(200, 120)?.entryId, 'card');
|
||||
// An earlier click subscriber publishes its own selection card: later
|
||||
// subscribers in the same click still see what the user clicked on.
|
||||
setOverlayEntries('other', [selectedEntry('elsewhere', { interactive: true })]);
|
||||
clearOverlaySource('cards');
|
||||
assert.equal(hitTestWorldOverlay(200, 120)?.entryId, 'card');
|
||||
assert.equal(hitTestWorldOverlay(200, 120, { sourceId: 'cards' })?.entryId, 'card');
|
||||
// The next paint shows the change, and the hit test follows it.
|
||||
env.postRender.raise();
|
||||
assert.equal(hitTestWorldOverlay(200, 120, { sourceId: 'cards' }), null);
|
||||
assert.equal(hitTestWorldOverlay(200, 120)?.entryId, 'elsewhere');
|
||||
env.cleanup();
|
||||
});
|
||||
|
||||
test('CCTV stable frame slots gate ambient chrome and wire the exact host hit rectangle', () => {
|
||||
const env = installMockEnvironment({ width: 500, height: 400, dpr: 1 });
|
||||
initWorldOverlay(env.viewer);
|
||||
|
||||
Reference in new issue
Block a user