fix(cctv): keep a clicked group in frame and let counts take clicks over plain fills

- The flight after a count click checks the frame on both axes and at the
  height of the highest mount, so a group on a slope or in a very wide
  window stays in view; when it cannot, it flies to the nearest cell with
  two or more cameras, never to a lone camera that joined the count.
- A count takes a click over a background fill no layer owns (earthquake
  discs, fire perimeters), and still yields to a scene item another layer
  registered.
- A count crossing the HUD edge refreshes the view only when the active
  icon or a lone camera depends on it, and never mid-motion, so panning no
  longer runs extra full view passes.
- A count restored at the HUD edge keeps the lone cameras its outline
  covers, and leaves the others as icons.
This commit is contained in:
German Khokhlov committed 2026-11-20 02:02:06 +04:00
1 parent f6982dc934
commit aba4c9e533
14 files changed
+674 -41

No files matched your search

+4
View File
@@ -131,6 +131,7 @@ test("a count click yields to a card above it and to another layer's object, not
() => clicks++,
);
picking.registerPickOwner('cctv', (id) => id.startsWith('cam-'));
picking.registerPickOwner('flights', (id) => id === 'abc' || id === 'cam-2');
try {
for (const [x, topHit, expected] of [
[14, null, [0, 1]],
@@ -149,6 +150,7 @@ test("a count click yields to a card above it and to another layer's object, not
}
} finally {
picking.unregisterPickOwner('cctv');
picking.unregisterPickOwner('flights');
}
});
@@ -181,6 +183,7 @@ test('a count click is the card on top for every layer, unless the count yields'
gesture: { travelPx: 0, durationMs },
});
picking.registerClickClaim('cctv', selection.countClickCard);
picking.registerPickOwner('flights', (id) => id === 'abc');
try {
const aircraftFirst = event();
assert.equal(picking.isUnderOtherCard(aircraftFirst), true);
@@ -209,5 +212,6 @@ test('a count click is the card on top for every layer, unless the count yields'
}
} finally {
picking.unregisterClickClaim('cctv');
picking.unregisterPickOwner('flights');
}
});