cve-connector
Version:
UE Web 开发套件
51 lines (38 loc) • 1.54 kB
TypeScript
import type { PolygonData, PolygonStyle } from '../features/polygon'
import type { Selector } from '../features/query'
import type { UIDescriptor } from '../utils/matchmaker'
export type PolygonCommand =
| 'AddPolygonTag'
| 'CreatePolygon'
| 'HidePolygon'
| 'DeletePolygon'
| 'RemovePolygonTag'
| 'RemovePolygonAllTags'
| 'SelectPolygon'
| 'ShowPolygon'
| 'UpdatePolygon'
| 'UnselectPolygon'
/** Polygon 控制 */
export interface PolygonController {
/** 为 Polygon 添加Tag */
addTag: (params: Selector, key: string, val: string) => Promise<UIDescriptor>
/** 生成 Polygon */
create: (polygons: PolygonData<PolygonStyle>[]) => Promise<UIDescriptor>
/** 删除指定的 Polygon */
delete: (params: Selector) => Promise<UIDescriptor>
/** 隐藏指定的 Polygon */
hide: (params: Selector) => Promise<UIDescriptor>
/** 移除 Polygon 的Tag */
removeTag: (params: Selector, key: string) => Promise<UIDescriptor>
/** 移除 Polygon 的所有Tag */
removeAllTags: (params: Selector) => Promise<UIDescriptor>
/** 选择指定的 Polygon */
select: (params: Selector) => Promise<UIDescriptor>
/** 显示指定的 Polygon */
show: (params: Selector) => Promise<UIDescriptor>
/** 取消选择的 Polygon */
unselect: () => Promise<UIDescriptor>
/** 更新 Polygon 的补充参数 */
update: (polygons: PolygonData<PolygonStyle>[]) => Promise<UIDescriptor>
}
export declare const PolygonController: PolygonController