1. EditorHandler
1.1. 初始化 new EditorHandler()
绘制图元对象编辑类
1.2. 属性
属性名 | Type | Default | Description |
---|---|---|---|
outlineImagePath | String |
Default_Outline_Path |
外框图标地址 |
1.3. 方法
1.3.1. editorHandler.clear()
清除图元编辑状态
Example
editorHandler.clear();
1.3.2. editorHandler.destroy()
销毁
1.3.3. editorHandler.setEditorObject(primitive, options)
设置编辑的绘制图元
Param | Type | Default | Description |
---|---|---|---|
primitive | Primitive |
自定义绘制图元 |
|
options | Object |
编辑配置 |
|
[options.updateCallback] | Object |
图元更新回调方法 |
|
[options.tipBeforeEditing] | String |
'拖动圆点或者轴进行编辑' |
编辑前的提示 |
[options.tipOfCentriod] | String |
'拖动该点可整体平移' |
编辑底面质心点的提示 |
[options.tipOfUpperCentriod] | String |
'拖动该点可修改高度' |
编辑拉伸质心点的提示 |
[options.tipOfBottomVertex] | String |
'拖动该点可修改' |
编辑底面顶点的提示 |
[options.tipOfAxis] | String |
'拖动该轴可移动位置' |
编辑轴时的提示 |
[options.heightScalar] | Number |
1 |
拉伸高度点平移量的倍数 |
[options.axisMovingScalar] | Number |
1 |
坐标轴平移量的倍数 |
Example
editorHandler.setEditorObject(drawPrimitive);
1.3.4. editorHandler.updateAssistants()
更新编辑辅助对象