refactor(section-managers): adapt to unified clipping API
SectionAxisDialogManager:
- Update activateSectionAxis → activeSection in callbacks
SectionBoxDialogManager:
- Update activateSectionBox → activeSection('box')
- Disable fitSectionBoxToModel and resetSectionBox (not supported)
SectionPlaneDialogManager:
- Add activeSection('face') to onDialogCreated
- Add deactivateSection() to onBeforeDestroy
- Wire onHide to engine.clipping.disabled()
- Keep onReverse/onReset as log-only (not supported)
This commit is contained in:
@@ -66,7 +66,7 @@ export class SectionAxisDialogManager extends BaseDialogManager {
|
||||
},
|
||||
onAxisChange: (axis) => {
|
||||
console.log('[SectionAxisDialogManager] 切换轴向:', axis);
|
||||
this.registry.engine3d?.activateSectionAxis(axis);
|
||||
this.registry.engine3d?.activeSection(axis);
|
||||
}
|
||||
});
|
||||
this.panel.init();
|
||||
@@ -84,7 +84,7 @@ export class SectionAxisDialogManager extends BaseDialogManager {
|
||||
}
|
||||
|
||||
// 自动激活默认轴向剖切(X轴)
|
||||
this.registry.engine3d.activateSectionAxis('x');
|
||||
this.registry.engine3d.activeSection('x');
|
||||
}
|
||||
|
||||
/** 对话框关闭时的回调,取消工具栏按钮激活状态 */
|
||||
@@ -94,8 +94,7 @@ export class SectionAxisDialogManager extends BaseDialogManager {
|
||||
|
||||
/** 销毁前的清理,销毁面板实例 */
|
||||
protected onBeforeDestroy(): void {
|
||||
// 停用轴向剖切
|
||||
this.registry.engine3d?.deactivateSectionAxis();
|
||||
this.registry.engine3d?.deactivateSection();
|
||||
|
||||
if (this.panel) {
|
||||
this.panel.destroy();
|
||||
|
||||
Reference in New Issue
Block a user