Interface IDrawPointEnterOptions

interface IDrawPointEnterOptions {
    autoFocus?: boolean;
    beforeUpdateCoordinate?: ((point, isMoveing, info, isSnapPoint?) => Promise<Vector3>);
    borderColor?: ColorRepresentation;
    color?: ColorRepresentation;
    disableUnProjectMenu?: boolean;
    drawLayerName?: string;
    escKeyCancel?: boolean;
    isAddToApp?: boolean;
    isExitToDefaultTool?: boolean;
    isSnap?: boolean;
    onAddData?: ((data) => boolean);
    onComplete?: ((isCancel, data) => void);
    onContextMenu?: ((info, context) => void);
    onKeyUp?: ((info, context) => void);
    size?: number;
    snapData?: [number, number, number][];
    snapDrawPoint?: boolean;
    unprojectOpts?: "depth" | UnProjectOpts;
    updateCoordinate?: ((point, isMoveing, data, symbol?) => void);
}

Properties

autoFocus?: boolean

进入时使div元素自动获取焦点(能响应键盘事件) 默认是

beforeUpdateCoordinate?: ((point, isMoveing, info, isSnapPoint?) => Promise<Vector3>)

坐标更新前回调

Type declaration

    • (point, isMoveing, info, isSnapPoint?): Promise<Vector3>
    • 坐标更新前回调

      Parameters

      • point: Vector3
      • isMoveing: boolean
      • info: TLEventHandler
      • Optional isSnapPoint: boolean

      Returns Promise<Vector3>

borderColor?: ColorRepresentation

顶点边框颜色

color?: ColorRepresentation

顶点颜色

disableUnProjectMenu?: boolean

右键时是否弹出默认的屏幕空间至世界坐标的投影右键菜单设置 默认 true

drawLayerName?: string

要绘制的绘图图层名称 默认为 draw

escKeyCancel?: boolean

按esc键取消 默认是

isAddToApp?: boolean

是否加入应用中,默认false

isExitToDefaultTool?: boolean

退出时直接退出至缺省工具,默认false

isSnap?: boolean

是否捕捉,默认是

onAddData?: ((data) => boolean)

增加数据回调,如果返回false,将不会加入地图中

Type declaration

    • (data): boolean
    • 增加数据回调,如果返回false,将不会加入地图中

      Parameters

      Returns boolean

onComplete?: ((isCancel, data) => void)

完成回调

Type declaration

    • (isCancel, data): void
    • 完成回调

      Parameters

      Returns void

onContextMenu?: ((info, context) => void)

右键上下文菜单回调

Type declaration

    • (info, context): void
    • 右键上下文菜单回调

      Parameters

      • info: TLEventHandler
      • context: {
            addPoint: ((worldPos, info?, isSnapPoint?, snapData?) => Promise<void>);
            cancel: (() => void);
            complete: (() => void);
            data: SymbolItemData;
            symbol: SymbolEntity;
        }
        • addPoint: ((worldPos, info?, isSnapPoint?, snapData?) => Promise<void>)
            • (worldPos, info?, isSnapPoint?, snapData?): Promise<void>
            • Parameters

              Returns Promise<void>

        • cancel: (() => void)

          如需要取消时调用

            • (): void
            • 如需要取消时调用

              Returns void

        • complete: (() => void)

          如需要完成时调用

            • (): void
            • 如需要完成时调用

              Returns void

        • data: SymbolItemData

          当前数据

        • symbol: SymbolEntity

          当前实体

      Returns void

onKeyUp?: ((info, context) => void)

键盘事件

Type declaration

    • (info, context): void
    • 键盘事件

      Parameters

      • info: TLEventHandler
      • context: {
            addPoint: ((worldPos, info?, isSnapPoint?, snapData?) => Promise<void>);
            cancel: (() => void);
            complete: (() => void);
            data: SymbolItemData;
            symbol: SymbolEntity;
        }
        • addPoint: ((worldPos, info?, isSnapPoint?, snapData?) => Promise<void>)
            • (worldPos, info?, isSnapPoint?, snapData?): Promise<void>
            • Parameters

              Returns Promise<void>

        • cancel: (() => void)

          如需要取消时调用

            • (): void
            • 如需要取消时调用

              Returns void

        • complete: (() => void)

          如需要完成时调用

            • (): void
            • 如需要完成时调用

              Returns void

        • data: SymbolItemData

          当前数据

        • symbol: SymbolEntity

          当前实体

      Returns void

size?: number

点大小

snapData?: [number, number, number][]

自定义要加的捕捉的数据

snapDrawPoint?: boolean

是否捕捉绘制的点,默认是

unprojectOpts?: "depth" | UnProjectOpts

同unproject的第三个参数 (undefined根据地图配置决定, false 不用场景数据, true用场景数据) 深度 (-1近裁剪面 到 1 远裁剪面) 或者输入 平面 或者由一个点所在的屏幕平面 或者使用当前场景实体 或 指定实体数组 或同时指定包含或过滤的实体 depth 使用深度

updateCoordinate?: ((point, isMoveing, data, symbol?) => void)

更新坐标回调

Type declaration

    • (point, isMoveing, data, symbol?): void
    • 更新坐标回调

      Parameters

      Returns void