ThreePipe
    Preparing search index...

    Class CustomContextMenu

    Represents a custom context menu that can be created and managed dynamically.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Element: undefined | HTMLDivElement = undefined

    The HTML element representing the context menu.

    Methods

    • Creates a custom context menu with specified items and options.

      Parameters

      • items: Record<string, () => void>

        An object containing menu item labels and corresponding callback functions.

      • x: number

        The horizontal position of the context menu.

      • y: number

        The vertical position of the context menu.

      • show: boolean = true

        Indicates whether the context menu should be displayed immediately.

      • removeOnSelect: boolean = true

        Indicates whether the context menu should be removed after an item is selected.

      Returns HTMLDivElement

      The HTML element representing the created context menu.