viewer2d.markerhover
Invoked when the user hovers over a marker.
Example
Usage
const onMarkerHover = function (event, marker) {
console.log("viewer2d.markerhover", "marker:", marker);
};
$("#viewer-2d").on("viewer2d.markerhover", onMarkerHover);Parameters
onMarkerHover
Function called when the user hovers over a marker.
Type |
|---|
(event: Object, marker: Object) => Void |
event
marker
The marker below the cursor.
Name | Type | Description |
|---|---|---|
clickable | Boolean | Whether marker is clickable |
data | Object | Data included with the marker when added |
draggable | Boolean | Whether marker moves when dragged |
element | SVGElement | SVG element of the marker |
fillColor | String | Color of the marker |
icon | Icon | icon of the marker |
id | String | Id of the marker |
position | Vector2 | Location of the marker |
text | String | Optional text label displayed alongside the marker |