Skip to content

InteractiveLayerOptions

Defined in: map/base-engine.ts:20

Declarative interaction options shared by every engine’s retained layers. The machinery (hover overlay, tooltip, selection styling, hit-testing) lives entirely in BaseEngine — these options are just the per-layer surface that both BaseEngine.select’s and the hover/tooltip dispatch read. Plot.layer()/Plot.points() and GeoMap.layer() forward them into the LayerSpec via BaseEngine.interactionFields, so the contract has one home.

D = any

optional hover?: HoverOption<D>

Defined in: map/base-engine.ts:27

Hover-highlight: true = default white outline, a HighlightStyle = redraw the hovered item with it, or a custom (datum, HighlightBuilder) draw fn. Rendered in a tiny overlay layer — O(hovered item) per change, the base layer is untouched.


optional selection?: SelectionOptions

Defined in: map/base-engine.ts:23

Styles for BaseEngine.select: the selected set and its complement. Defaults: selected keeps the base style; others { opacity: 0.3 }.


optional tooltip?: (d, id) => string | HTMLElement | null

Defined in: map/base-engine.ts:31

Hover tooltip content for this layer (null hides). Shown in a shared engine-managed div — see tooltipClass for styling. Re-evaluated only when the hovered target changes; re-declare the layer to force a refresh.

D

string | number

string | HTMLElement | null