api.contextMenu
ContextMenuApi
Items in the right-click menus of the map and the terrain palette.
Members
add
add(surface: ContextSurface, item: ContextItemSpec): Disposable;
Types
Declarations only this group names.
ContextSurfacetype
type ContextSurface = "viewport" | "terrainPalette";
ContextItemSpecinterface
interface ContextItemSpec
label: string | ((ctx: ContextMenuContext) => string) | |
|---|---|
enabled?: (ctx: ContextMenuContext) => boolean | |
visible?: (ctx: ContextMenuContext) => boolean | |
run?: (ctx: ContextMenuContext) => void | Give this or |
command?: string |