Skip to content

MinimapHandle

Defined in: src/components/editor/Minimap/Minimap.types.ts:152

Imperative handle exposed via ref on <Minimap> and <ViewportMinimap>. Stable for the lifetime of the component.

Methods

focus()

focus(): void

Defined in: src/components/editor/Minimap/Minimap.types.ts:154

Focus the minimap body so arrow keys start working.

Returns

void


getElement()

getElement(): HTMLDivElement | null

Defined in: src/components/editor/Minimap/Minimap.types.ts:156

Access the underlying body DOM element (the role="region" div).

Returns

HTMLDivElement | null


minimapToWorld()

minimapToWorld(point): Point2D

Defined in: src/components/editor/Minimap/Minimap.types.ts:160

Inverse of worldToMinimap.

Parameters

point

Point2D

Returns

Point2D


worldToMinimap()

worldToMinimap(point): Point2D

Defined in: src/components/editor/Minimap/Minimap.types.ts:158

Convert a world-space point to minimap CSS-pixel coordinates.

Parameters

point

Point2D

Returns

Point2D