CommentEditor(options)

批注类

new CommentEditor(options)

Parameters:
Name Type Description
options Object

包含以下参数的对象

Properties
Name Type Attributes Default Description
viewer Viewer

Motor.Viewer实例化对象

lineWidth Number <optional>
6

线条粗细

color Color <optional>
Motor.Color.RED

颜色

font String <optional>
"20px Arial"

字体,遵循CSS字体设置标准

Members

color :Color

获取或设置颜色

commentType :CommentType

批注类型

Default Value:
  • CommentType.ARROWLINE

font :String

获取或设置字体

lineWidth :Number

获取或设置线条粗细

Methods

destroy()

销毁批注编辑器

exportImage() → {Promise}

导出图片

Returns:
Promise -

返回图片base64 url的promise

isDestroyed()

检测批注编辑器是否销毁