Skip to main content

DrawOverlay

The draw tool's drawing: every shape with its fill and outline, the unfinished one dashed, the selected one drawn heavier, a dashed preview of the next edge, and the handles of the selected shape. Render it inside MapOverlayLayer.

This is a function exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import { DrawOverlay } from "@mapcairn/map";

function DrawOverlay(input: DrawOverlayProps): JSX.Element | null;

Parameters​

  • { shapes, selection, handles, hoveredHandle, hover, testId, }
  • input (DrawOverlayProps)

Returns​

JSX.Element | null

Remarks​

Edges go the short way across the antimeridian. On a globe each edge follows its great circle and stops at the horizon: a point or handle beyond it is left out, and a closed shape's fill is drawn only while all of its outline is in sight. Selection is shown by weight, handles and a filled vertex as well as colour. The layer never takes the pointer: the adapter owns the press on a handle, and this only draws where the handles are.

See also​

Source: packages/map/src/host/overlays/DrawOverlay.tsx:314