Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Interface ContextMenuOptions

    interface ContextMenuOptions {
        closeOnSelect?: boolean;
        eventName?: string;
        fixed?: boolean;
        jQuery?: boolean;
        onClose?: ContextMenuCallback;
        onOpen?: ContextMenuCallback;
        relative?: "target" | "cursor";
    }
    Index

    Properties

    closeOnSelect?: boolean

    Close the context menu when one of the options is selected.

    eventName?: string

    Optionally override the triggering event which can spawn the menu. If the menu is using fixed positioning, this event must be a MouseEvent.

    fixed?: boolean

    If true, the context menu is given a fixed position rather than being injected into the target.

    jQuery?: boolean

    If true, callbacks will be passed jQuery objects instead of HTMLElement instances.

    A function to call when the context menu is closed.

    A function to call when the context menu is opened.

    relative?: "target" | "cursor"

    For fixed context menus, control whether the menu is positioned relative to the target or to the mouse cursor. Non-fixed context menus are always positioned relative to the target.