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
data
• Optional
data: T
Data for the pin
Defined in
point
• point: Point
The point in the screen coordinate system.
Defined in
size
• Optional
size: number
The size of the pin
Defined in
Methods
onClick
▸ Optional
onClick(event
, point
, size
, data?
): void
A handler for click events
Parameters
Name | Type |
---|---|
event | MouseEvent <SVGElement , MouseEvent > |
point | Point |
size | Size |
data? | T |
Returns
void
Defined in
onContextMenu
▸ Optional
onContextMenu(event
, point
, size
, data?
): void
A handler for a context menu event
Parameters
Name | Type |
---|---|
event | MouseEvent <SVGElement , MouseEvent > |
point | Point |
size | Size |
data? | T |
Returns
void
Defined in
onHover
▸ Optional
onHover(mouseOver
, point
, size
, data?
): void
A function called when the mouse enters or leaves the pin
Parameters
Name | Type |
---|---|
mouseOver | boolean |
point | Point |
size | Size |
data? | T |
Returns
void
Defined in
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
Name | Type |
---|---|
point | Point |
size | Size |
data? | T |
Returns
ReactElement
<any
, string
| JSXElementConstructor
<any
>>