添加测试信息
This commit is contained in:
@@ -12,7 +12,7 @@ export class Toolbar extends BimButtonGroup {
|
||||
await super.init();
|
||||
|
||||
// 动态加载默认按钮配置
|
||||
const { homeButton } = await import('./buttons/home');
|
||||
const { createHomeButton } = await import('./buttons/home');
|
||||
const { locationButton } = await import('./buttons/location');
|
||||
const { walkMenuButton } = await import('./buttons/walk/walk-menu');
|
||||
const { walkPersonButton } = await import('./buttons/walk/walk-person');
|
||||
@@ -21,7 +21,14 @@ export class Toolbar extends BimButtonGroup {
|
||||
const { infoButton } = await import('./buttons/info');
|
||||
|
||||
this.addGroup('group-1');
|
||||
this.addButton(homeButton);
|
||||
|
||||
// 使用工厂函数创建按钮,并注入 engine
|
||||
if (this.engine) {
|
||||
this.addButton(createHomeButton(this.engine));
|
||||
} else {
|
||||
console.warn('[Toolbar] Engine not available when creating buttons.');
|
||||
}
|
||||
|
||||
this.addButton(walkMenuButton);
|
||||
this.addButton(walkPersonButton);
|
||||
this.addButton(walkBirdButton);
|
||||
|
||||
Reference in New Issue
Block a user