fix(voice): point-and-ask over a Street Level coverage line names its sequence again

The coverage lines were one primitive per sequence, picked as the
sequence's id. Drawn in parts, a part after the first carries its own
#n id, which point-and-ask passed on. A hit whose item names the id its
parts pick as (meta.pick) resolves as that id, as the line's click
already does.
This commit is contained in:
Sameh Khamis committed 2026-11-14 01:47:20 -08:00
1 parent d2e161372c
commit 805c9b5ccd
2 files changed
+15 -1

No files matched your search

+10
View File
@@ -76,6 +76,16 @@ test('something drawn outside the draw port resolves through its pick owner', ()
unregisterPickOwner('flights');
});
test('a part of an item drawn in parts resolves as the id its parts pick as', () => {
registerPickOwner('flights', (id) => String(id).startsWith('seq:'));
const out = resolvePickedContext(
{ set: 'lines:1', id: 'seq:42#2', meta: { pick: 'seq:42' }, surface: false },
{ dataManager: manager() },
);
assert.equal(out?.id, 'seq:42', 'never the part’s own #n id');
unregisterPickOwner('flights');
});
test('disabled layers, trails and empty picks never resolve', () => {
registerPickOwner('military', (id) => id === 'm1');
const hit = (id) => ({ set: 'x:1', id, surface: false });