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 { BaseManager } from '../core/base-manager';
|
||||
import { ManagerRegistry } from '../core/manager-registry';
|
||||
import { WalkControlPanel } from '../components/walk-control-panel';
|
||||
import { WalkPathDialogManager } from './walk-path-dialog-manager';
|
||||
|
||||
@@ -16,13 +17,13 @@ export class WalkControlManager extends BaseManager {
|
||||
/** 路径漫游对话框管理器 */
|
||||
private pathManager: WalkPathDialogManager | null = null;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
constructor(registry: ManagerRegistry) {
|
||||
super(registry);
|
||||
}
|
||||
|
||||
/** 初始化管理器 */
|
||||
public init(): void {
|
||||
this.pathManager = new WalkPathDialogManager();
|
||||
this.pathManager = new WalkPathDialogManager(this.registry);
|
||||
this.pathManager.init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user