WebCAD-Lib-TS API 文档 - v1.0.0
    Preparing search index...

    Interface ContextMenuOpeningEventArgs

    右键菜单打开中事件参数(可取消、可自定义菜单项)

    interface ContextMenuOpeningEventArgs {
        timestamp: number;
        customData?: any;
        cancel: boolean;
        cancelReason?: string;
        document: CadDocument;
        screenX: number;
        screenY: number;
        canvasX: number;
        canvasY: number;
        isCommandActive: boolean;
        activeCommandName?: string;
        menuItems: ContextMenuItemInfo[];
        prependItems: ContextMenuItemInfo[];
        appendItems: ContextMenuItemInfo[];
        useDefaultItems: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    timestamp: number

    事件发生的时间戳

    customData?: any

    自定义数据,二次开发者可以附加额外信息

    cancel: boolean

    设置为 true 将取消该操作

    cancelReason?: string

    取消原因说明

    document: CadDocument

    当前文档

    screenX: number

    鼠标点击的屏幕坐标 X

    screenY: number

    鼠标点击的屏幕坐标 Y

    canvasX: number

    鼠标点击的画布坐标 X

    canvasY: number

    鼠标点击的画布坐标 Y

    isCommandActive: boolean

    是否有命令正在执行

    activeCommandName?: string

    当前正在执行的命令名称(如果有)

    menuItems: ContextMenuItemInfo[]

    默认菜单项(可修改)

    prependItems: ContextMenuItemInfo[]

    在默认菜单项之前添加的自定义菜单项

    appendItems: ContextMenuItemInfo[]

    在默认菜单项之后添加的自定义菜单项

    useDefaultItems: boolean

    是否使用默认菜单项(设为 false 则只显示自定义项)