style(menu): remove default list style bullets from menu

This commit is contained in:
yuding
2025-12-10 09:42:05 +08:00
parent 9ae1d9d809
commit 9903a71015
15 changed files with 1668 additions and 1683 deletions

View File

@@ -1,6 +1,9 @@
import { Engine, type EngineOptions, type ModelLoadOptions } from '../components/engine';
import { BimComponent } from '../core/component';
import type { BimEngine } from '../bim-engine';
import { RightKeyManager } from './right-key-manager';
import { infoMenuButton } from '../components/menu/buttons/info';
import { homeMenuButton } from '../components/menu/buttons/home';
/**
* 3D 引擎管理器
@@ -13,6 +16,8 @@ export class EngineManager extends BimComponent {
/** 3D 引擎组件实例 */
private engineInstance: Engine | null = null;
public rightKey: RightKeyManager | null = null; // 右键菜单管理器
/**
* 构造函数
* @param engine 引擎实例
@@ -47,6 +52,17 @@ export class EngineManager extends BimComponent {
// 调用组件的 init 方法初始化引擎
this.engineInstance.init();
// 初始化右键 (移到 return 之前)
this.rightKey = new RightKeyManager(this.engine, this.container);
// 注册默认右键菜单
this.rightKey.registerHandler((_e) => {
return [
infoMenuButton(this.engine),
homeMenuButton(this.engine)
];
});
return this.engineInstance.isInitialized();
} catch (error) {
console.error('[EngineManager] Failed to initialize 3D engine:', error);
@@ -54,9 +70,8 @@ export class EngineManager extends BimComponent {
return false;
}
}
/**
* 检 3D 引擎是否已初始化
* 检<EFBFBD><EFBFBD><EFBFBD> 3D 引擎是否已初始化
*/
public isInitialized(): boolean {
return this.engineInstance !== null && this.engineInstance.isInitialized();
@@ -95,6 +110,10 @@ export class EngineManager extends BimComponent {
this.engineInstance.destroy();
this.engineInstance = null;
}
if (this.rightKey) {
this.rightKey.destroy();
this.rightKey = null;
}
}
}