viewer2d.markerclick
Invoked when the user clicks a marker.
Example
Usage
const onMarkerClick = function (event, marker) {
console.log("viewer2d.markerclick", "marker:", marker);
};
$("#viewer-2d").on("viewer2d.markerclick", onMarkerClick);Parameters
onMarkerClick
Function called when the user clicks a marker.
Type |
|---|
(event: Object, marker: Object) => Void |
event
marker
The marker the user clicked.
Name | Type | Description |
|---|---|---|
color | String | Color of the marker |
data | Object | Data included with the marker when added |
id | String | Id of the marker |
text | String | Optional text label displayed alongside the marker |
x | Number | X coordinate of the marker in pixels |
y | Number | Y coordinate of the marker in pixels |