new Annotation()
- Description:
- Source:
Methods
boardReRenderWH(width, height)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
width |
int
|
宽 |
height |
int
|
高 |
boardReRenderWH(width, height)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
width |
int
|
宽 |
height |
int
|
高 |
clear()
- Description:
- Source:
clear()
- Description:
- Source:
clearCurrEraser()
- Description:
- Source:
clearCurrEraser()
- Description:
- Source:
clearCurrHlightPoint()
- Description:
- Source:
clearCurrHlightPoint()
- Description:
- Source:
delImg()
- Description:
- Source:
delImg()
- Description:
- Source:
download()
- Description:
- Source:
Example
annotation.download();
download()
- Description:
- Source:
Example
annotation.download();
hlightPointInit()
- Description:
- Source:
hlightPointInit()
- Description:
- Source:
init(annoDiv, annotationInitType)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
annoDiv |
HTMLDivElement
|
注释所在的应用层容器,只能传入div元素 |
annotationInitType |
String
|
注释初始化类型 可选值: AnnotationInitTypeEnum.proportional, AnnotationInitTypeEnum.full |
init(annoDiv, annotationInitType)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
annoDiv |
HTMLDivElement
|
注释所在的应用层容器,只能传入div元素 |
annotationInitType |
String
|
注释初始化类型 可选值: AnnotationInitTypeEnum.proportional, AnnotationInitTypeEnum.full |
redo()
- Description:
- Source:
redo()
- Description:
- Source:
redoShape()
- Description:
- Source:
redoShape()
- Description:
- Source:
rotateImg()
- Description:
- Source:
rotateImg()
- Description:
- Source:
scaleImg(isEnlarge, percentage)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
isEnlarge |
boolean
|
是否放大,true为放大,false为缩小 |
percentage |
number
|
缩放比例,小数,例如0.1 |
scaleImg(isEnlarge, percentage)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
isEnlarge |
boolean
|
是否放大,true为放大,false为缩小 |
percentage |
number
|
缩放比例,小数,例如0.1 |
setAllowEditImg(isAllow)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
isAllow |
Boolean
|
白板是否设置为图片模式,在此模式下画笔不生效,设置画笔时请关闭图片模式 |
setAllowEditImg(isAllow)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
isAllow |
Boolean
|
白板是否设置为图片模式,在此模式下画笔不生效,设置画笔时请关闭图片模式 |
setArrowLength(value)
- Description:
- Source:
Example
annotation.setArrowLength(10);
Parameters:
| Name |
Type |
Description |
value |
int
|
箭头宽度 |
setArrowLength(value)
- Description:
- Source:
Example
annotation.setArrowLength(10);
Parameters:
| Name |
Type |
Description |
value |
int
|
箭头宽度 |
setArrowType(value)
- Description:
- Source:
Example
annotation.setArrowType(arrowTypeEnum.double);
Parameters:
setArrowType(value)
- Description:
- Source:
Example
annotation.setArrowType(arrowTypeEnum.double);
Parameters:
setColor(value)
- Description:
- Source:
Example
annotation.setColor('rgba(255,0,0,1');
Parameters:
| Name |
Type |
Description |
value |
String
|
颜色,采用rgb和rgba格式 |
setColor(value)
- Description:
- Source:
Example
annotation.setColor('rgba(255,0,0,1');
Parameters:
| Name |
Type |
Description |
value |
String
|
颜色,采用rgb和rgba格式 |
setColorOpacity(value)
- Description:
- Source:
Example
annotation.setColor('rgba(255,0,0,1');
Parameters:
| Name |
Type |
Description |
value |
String
|
颜色,采用rgb和rgba格式 |
setColorOpacity(value)
- Description:
- Source:
Example
annotation.setColor('rgba(255,0,0,1');
Parameters:
| Name |
Type |
Description |
value |
String
|
颜色,采用rgb和rgba格式 |
setFillColor(value)
- Description:
- Source:
Example
annotation.setFillColor(fillTypeEnum.full);
Parameters:
setFillColor(value)
- Description:
- Source:
Example
annotation.setFillColor(fillTypeEnum.full);
Parameters:
setLineWidth(value)
- Description:
- Source:
Example
annotation.setLineWidth(1);
Parameters:
| Name |
Type |
Description |
value |
int
|
线条宽度 |
setLineWidth(value)
- Description:
- Source:
Example
annotation.setLineWidth(1);
Parameters:
| Name |
Type |
Description |
value |
int
|
线条宽度 |
setShapeType(type)
- Description:
- 注释设置几何形状,如矩形,随机线等 注释类型,如鼠标、注释、橡皮擦
- Source:
Example
annotation.setShapeType(shapeTypeEnum.polyline);
Parameters:
setShapeType(type)
- Description:
- 注释设置几何形状,如矩形,随机线等 注释类型,如鼠标、注释、橡皮擦
- Source:
Example
annotation.setShapeType(shapeTypeEnum.polyline);
Parameters:
startHlightPoint()
- Description:
- Source:
startHlightPoint()
- Description:
- Source:
startTextInput(themeConfig)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
themeConfig |
object
|
主题样式,用于自定义文字输入框确认和取消按钮,例如:{confirm: {color: '#000000', text: '确定'}, cancel: {color: '#001100', text: '取消'}} |
startTextInput(themeConfig)
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
themeConfig |
object
|
主题样式,用于自定义文字输入框确认和取消按钮,例如:{confirm: {color: '#000000', text: '确定'}, cancel: {color: '#001100', text: '取消'}} |
undo()
- Description:
- Source:
undo()
- Description:
- Source:
undoShape()
- Description:
- Source:
undoShape()
- Description:
- Source:
uploadImg(accessToken, fileTarget) → {object}
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
accessToken |
String
|
认证串 |
fileTarget |
object
|
input:file控件选择的图片文件对象 |
Returns:
Promise
-
Type
-
object
uploadImg(accessToken, fileTarget) → {object}
- Description:
- Source:
Parameters:
| Name |
Type |
Description |
accessToken |
String
|
认证串 |
fileTarget |
object
|
input:file控件选择的图片文件对象 |
Returns:
Promise
-
Type
-
object