Skip to main content

Interface: PinProps<T>

The prop type of an [[Pin]] component.

Type parameters​

Name
T

Properties​

color​

• Optional color: string

The color of the pin

Defined in​

components/Pin.tsx:20


data​

• Optional data: T

Data for the pin

Defined in​

components/Pin.tsx:16


point​

• point: Point

The point in the screen coordinate system.

Defined in​

components/Pin.tsx:14


size​

• Optional size: number

The size of the pin

Defined in​

components/Pin.tsx:18

Methods​

onClick​

▸ Optional onClick(event, point, size, data?): void

A handler for click events

Parameters​

NameType
eventMouseEvent<SVGElement, MouseEvent>
pointPoint
sizeSize
data?T

Returns​

void

Defined in​

components/Pin.tsx:26


onContextMenu​

▸ Optional onContextMenu(event, point, size, data?): void

A handler for a context menu event

Parameters​

NameType
eventMouseEvent<SVGElement, MouseEvent>
pointPoint
sizeSize
data?T

Returns​

void

Defined in​

components/Pin.tsx:33


onHover​

▸ Optional onHover(mouseOver, point, size, data?): void

A function called when the mouse enters or leaves the pin

Parameters​

NameType
mouseOverboolean
pointPoint
sizeSize
data?T

Returns​

void

Defined in​

components/Pin.tsx:24


renderPopup​

▸ Optional renderPopup(point, size, data?): ReactElement<any, string | JSXElementConstructor<any>>

A function called to render a popup when the mouse is over the pin

Parameters​

NameType
pointPoint
sizeSize
data?T

Returns​

ReactElement<any, string | JSXElementConstructor<any>>

Defined in​

components/Pin.tsx:22