Constructor
new Glodon.Bimface.Plugins.Annotation.AnnotationManager(annotationManagerConfig)
Parameters:
| Name | Type | Description |
|---|---|---|
| annotationManagerConfig | Glodon.Bimface.Plugins.Annotation.AnnotationManagerConfig | 构造批注对象的配置项 |
Methods
clear()
清空批注绘制内容
createSnapshot(callback)
生成批注截图
Parameters:
| Name | Type | Description |
|---|---|---|
| callback | function | 异步生成截图后的回调函数,参数为base64的字符串 |
endDrawing()
退出批注绘制
getAnnotationList()
获取批注列表
Returns:
| Type | Description |
|---|---|
| Array |
批注列表 |
getCurrentState()
获取当前场景的视角及批注
Returns:
| Type | Description |
|---|---|
| Object |
当前场景的视角及批注 |
hideAnnotation()
隐藏批注
onClick(callback)
批注的点击事件
Parameters:
| Name | Type | Description |
|---|---|---|
| callback | function | 左键点击事件 |
removeSelectedAnnotation()
去除批注选中效果
setAnnotationList(annotationList)
设置批注列表
Parameters:
| Name | Type | Description |
|---|---|---|
| annotationList | Array | 批注列表 |
setAnnotationType(type)
设置批注类型
Parameters:
| Name | Type | Description |
|---|---|---|
| type | Glodon.Bimface.Plugins.Annotation.AnnotationTypeOption | 批注类型 |
setFillColor(color)
设置批注填充色
Parameters:
| Name | Type | Description |
|---|---|---|
| color | Glodon.Web.Graphics.Color | 批注填充色 |
setFontFamily(family)
设置批注字体样式
Parameters:
| Name | Type | Description |
|---|---|---|
| family | String | 批注字体样式 |
setFontSize(size)
设置批注字体大小
Parameters:
| Name | Type | Description |
|---|---|---|
| size | Number | 批注字体大小 |
setLineColor(color)
设置批注线颜色
Parameters:
| Name | Type | Description |
|---|---|---|
| color | Glodon.Web.Graphics.Color | 批注线颜色 |
setLineWidth(width)
设置批注线宽
Parameters:
| Name | Type | Description |
|---|---|---|
| width | Number | 批注线宽 |
setState(state)
恢复批注状态
Parameters:
| Name | Type | Description |
|---|---|---|
| state | Object | getCurrentState获取的批注状态对象 |
setStyle(style)
设置批注样式
Parameters:
| Name | Type | Description |
|---|---|---|
| style | String | 批注样式 |
showAnnotation()
显示批注
startDrawing()
开始批注绘制