NoteModel
用于管理批注功能的模型,包括文本批注、圆形批注、矩形批注等
关系
Implements
NoteModel Implements INoteModel
实现接口: INoteModel
用于管理批注功能的模型,包括文本批注、圆形批注、矩形批注等
构造函数
NoteModel
构造函数
属性
color
颜色
color: string
类型: string
currentGroupId
当前批注分组id
currentGroupId: string | number = 1
类型: string | number
默认值:1
drawDomGraphic
当前绘制图形
drawDomGraphic: DynamicDom
类型: DynamicDom
drawDomGraphics
绘制图形集合
drawDomGraphics: DynamicDom
类型: DynamicDom
graphicsLayer
几何图层
graphicsLayer: GraphicsLayer
类型: GraphicsLayer
noteGroups
批注数据合集
noteGroups: INoteGroup
类型: INoteGroup
props
插件模型属性
props: IPluginModelProps
size
尺寸
size: number
类型: number
type
当前操作类型
type: string
类型: string
viewModel
sketch草图
viewModel: DrawViewModel
类型: DrawViewModel
方法
changeDomGraphic
修改drawDomGraphic
changeDomGraphic(type): void
参数
- type:
string类型
返回:void
clear
清空所有批注
clear(): void
返回:void
create
创建批注
createGroup
创建分组
createNote
创建批注
createNote(graphic, groupId?): void
参数
- graphic:
INoteGraphic批注数据 - groupId?:
string|number分组ID
返回:void
delDrawDomGraphic
删除绘制批注
delDrawDomGraphic(id): void
参数
- id:
string|number批注id
返回:void
delGroup
删除批注分组
delGroup(id): void
参数
- id:
number批注分组id
返回:void
delNote
删除批注
delNote(id): void
参数
- id:
number批注id
返回:void
handleCreateNote
处理创建批注
handleCreateNote(type): void
参数
- type:
string批注类型
返回:void
listenMouseBotton
监听鼠标拖拽事件
listenMouseBotton(): void
返回:void
listenSceneClick
监听场景创建
listenSceneClick(): void
返回:void
saveToImg
将当前批注场景进行截图并下载
saveToImg(): void
返回:void
sketchInit
初始化sketch,使用sketch创建圆形和箭头批注
sketchInit(): void
返回:void
stopDraw
停止绘制
stopDraw(): void
返回:void
updateNoteGroupsGraphics
更新NoteGroupsGraphics数据
updateNoteGroupsGraphics(id, option): void
参数
- id:
numbergraphic唯一值 - option:
any更新内容
返回:void

BIMFlux AI
