Constructor
new Glodon.Bimface.Plugins.ExternalObject.ExternalObjectEditorToolbar(ExternalObjectEditorToolbarConfig)
Parameters:
Name | Type | Description |
---|---|---|
ExternalObjectEditorToolbarConfig | Glodon.Bimface.Plugins.ExternalObject.ExternalObjectEditorToolbarConfig | 外部构件编辑器工具条配置项 |
Methods
addEventListener(event, callback)
注册监听事件
Parameters:
Name | Type | Description |
---|---|---|
event | Glodon.Bimface.Plugins.ExternalObject.ExternalObjectEditorToolbarEvent | 外部构件编辑器监听事件 |
callback | function | 监听事件的回调函数 |
exit()
退出编辑状态
getButtonVisibility()
获取编辑按钮可见性
Returns:
Type | Description |
---|---|
Object |
编辑按钮可见性 |
getEditedExternalObjectId()
获取被编辑外部构件的ID
Returns:
Type | Description |
---|---|
String |
外部构件ID |
getEditingMode()
获取当前编辑功能
Returns:
Type | Description |
---|---|
String |
编辑功能,“rotation”、“translation”、“scale” |
getRotationController()
获取旋转轴禁用状态
Returns:
Type | Description |
---|---|
Object |
Object 旋转轴禁用状态,默认为{"X":true,"Y":true,"Z":true} |
getScaleController()
获取缩放禁用状态
Returns:
Type | Description |
---|---|
Object |
缩放禁用状态,是否开启等比缩放或某轴的轴向缩放。默认为{"Uniform":true,"X":true,"Y":true,"Z":true}。 |
getTranslationController()
获取平移轴禁用状态
Returns:
Type | Description |
---|---|
Object |
Object 平移轴禁用状态,是否开启沿某轴的平移。默认为{"X":true,"Y":true,"Z":true} |
hide()
隐藏编辑工具条
removeEventListener(event, callback)
注销监听事件
Parameters:
Name | Type | Description |
---|---|---|
event | Glodon.Bimface.Plugins.ExternalObject.ExternalObjectEditorToolbarEvent | 外部构件编辑器监听事件 |
callback | function | 监听事件的回调函数 |
setButtonVisibility(buttonVisibility)
设置工具条编辑状态配置
Parameters:
Name | Type | Description |
---|---|---|
buttonVisibility | Object | 编辑工具条启用状态,默认为{“translate”:true,“rotate”:true,“scale”:true} |
setEditedExternalObjectId(id)
根据ID设置,选择进行编辑操作的外部构件
Parameters:
Name | Type | Description |
---|---|---|
id | String | 外部构件ID |
setEditingMode()
设置当前编辑功能
setRotationController()
设置旋转轴禁用状态
setScaleController()
设置缩放禁用状态
setTranslationController()
设置平移轴禁用状态
show()
显示编辑工具条