mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
An interactive overlay entry is a card that takes every click from what is drawn under it, so a base's label kept an aircraft or vessel under it from being selected. The labels are no longer interactive entries. The layer claims a click on a label box through the pick registry's click claim, as CCTV counts do, only where nothing another layer draws is under it; over the map or the layer's own dots and fills the label takes it, and another layer's card painted over the label keeps its click. The label box is read from the box the overlay painted for it (overlayHost.paintRect).
17 lines
462 B
JavaScript
17 lines
462 B
JavaScript
import {
|
|
clearOverlaySource,
|
|
getOverlayPaintRect,
|
|
getWorldOverlayDiagnostics,
|
|
hitTestWorldOverlay,
|
|
setOverlayEntries,
|
|
setOverlaySourceVisible,
|
|
} from '../../overlays/worldOverlay.js';
|
|
export const overlayHost = Object.freeze({
|
|
clearSource: clearOverlaySource,
|
|
getDiagnostics: getWorldOverlayDiagnostics,
|
|
hitTest: hitTestWorldOverlay,
|
|
paintRect: getOverlayPaintRect,
|
|
setEntries: setOverlayEntries,
|
|
setVisible: setOverlaySourceVisible,
|
|
});
|