refactor(managers): accept registry parameter via constructor injection
All 16 managers now receive ManagerRegistry instance through constructor instead of calling ManagerRegistry.getInstance(). This enables each BimEngine instance to have its own isolated set of managers. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* 负责管理漫游路径设置对话框的显示和交互
|
||||
*/
|
||||
import { BaseDialogManager } from '../core/base-dialog-manager';
|
||||
import { ManagerRegistry } from '../core/manager-registry';
|
||||
import { WalkPathPanel } from '../components/walk-path-panel';
|
||||
|
||||
/**
|
||||
@@ -13,6 +14,10 @@ export class WalkPathDialogManager extends BaseDialogManager {
|
||||
/** 漫游路径面板实例 */
|
||||
private panel: WalkPathPanel | null = null;
|
||||
|
||||
constructor(registry: ManagerRegistry) {
|
||||
super(registry);
|
||||
}
|
||||
|
||||
/** 对话框唯一标识 */
|
||||
protected get dialogId() { return 'walk-path-dialog'; }
|
||||
/** 对话框标题(国际化 key) */
|
||||
@@ -45,7 +50,7 @@ export class WalkPathDialogManager extends BaseDialogManager {
|
||||
|
||||
/** 创建对话框内容 */
|
||||
protected createContent(): HTMLElement {
|
||||
this.panel = new WalkPathPanel();
|
||||
this.panel = new WalkPathPanel(this.registry);
|
||||
this.panel.init();
|
||||
return this.panel.element;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user