Events
viewer2d.markerclick
invoked when the user clicks a marker example usage const onmarkerclick = function (event) { const { marker } = event; console log("viewer2d markerclick", "marker ", marker); }; viewer2d addeventlistener("viewer2d markerclick", onmarkerclick); jquery 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) => void event name type description marker object marker below the cursor srcevent object original dom 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 function called when the user clicks a marker type (event object, marker object) => void event jquery event https //api jquery com/category/events/event object/ 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