feat(registry): 注册 ComponentDetailManager 到全局 Registry 和 BimEngine

This commit is contained in:
yuding
2026-01-28 12:00:55 +08:00
parent 33f1c72791
commit 89789e003b
87 changed files with 37063 additions and 24064 deletions

View File

@@ -57,27 +57,30 @@ export class SectionBoxDialogManager extends BaseDialogManager {
defaultHidden: false,
defaultReversed: false,
onHideToggle: (isHidden) => {
console.log('[SectionBoxDialogManager] 隐藏切换:', isHidden);
// 底层暂不支持隐藏功能
console.log('[SectionBoxDialogManager] 隐藏切换(底层暂不支持):', isHidden);
},
onReverseToggle: (isReversed) => {
console.log('[SectionBoxDialogManager] 反向切换:', isReversed);
// 底层暂不支持反向功能
console.log('[SectionBoxDialogManager] 反向切换(底层暂不支持):', isReversed);
},
onFitToModel: () => {
console.log('[SectionBoxDialogManager] 适应到模型');
this.registry.engine3d?.fitSectionBoxToModel();
},
onReset: () => {
console.log('[SectionBoxDialogManager] 重置');
this.registry.engine3d?.resetSectionBox();
},
onRangeChange: (range) => {
console.log('[SectionBoxDialogManager] 范围变化:', range);
this.registry.engine3d?.setSectionBoxRange(range);
}
});
this.panel.init();
return this.panel.element;
}
/** 对话框创建后的回调,自适应高度 */
/** 对话框创建后的回调,激活剖切盒并自适应高度 */
protected onDialogCreated(): void {
this.registry.engine3d?.activateSectionBox();
this.dialog?.fitHeight(false);
}
@@ -86,8 +89,9 @@ export class SectionBoxDialogManager extends BaseDialogManager {
this.registry.toolbar?.setBtnActive('section-box', false);
}
/** 销毁前的清理,销毁面板实例 */
/** 销毁前的清理,停用剖切盒并销毁面板实例 */
protected onBeforeDestroy(): void {
this.registry.engine3d?.deactivateSectionBox();
if (this.panel) {
this.panel.destroy();
this.panel = null;