Events
viewer2d.contextmenu
invoked when the user performs a right click inside the viewer example usage const oncontextmenu = function (event) { const { intersects } = event; console log("viewer2d contextmenu", "intersects ", intersects); }; viewer2d addeventlistener("viewer2d contextmenu", oncontextmenu); jquery const oncontextmenu = function (event, location, objectid) { console log("viewer2d contextmenu", "location ", location, "objectid ", objectid); }; $("#viewer 2d") on("viewer2d contextmenu", oncontextmenu); parameters oncontextmenu function called when the user performs a right click inside the viewer type (event object) => void event name type description intersects object object below the cursor, undefined if none preventdefault function disable space selection for right click event srcevent object original dom event intersects name type description objectid string id of the object point vector3 docid\ gqdk6khl9iuzriegxvdd0 intersection point of the object normal vector3 docid\ gqdk6khl9iuzriegxvdd0 normal vector at the intersection point function called when the user performs a right click inside the viewer type (event object, location object, objectid string?) => void event jquery event https //api jquery com/category/events/event object/ location coordinates of the position clicked name type description x number x coordinate of pointer position in pixels y number y coordinate of pointer position in pixels z number height of the last storey shown in meters objectid id of the object clicked, undefined if no object under cursor