feat: 优化测量功能架构与引擎组件

- 重构测量激活逻辑,在 Engine 组件中添加统一的 activateMeasure(mode) 方法
- 简化 MeasureDialogManager,移除冗余的 handleMeasureTypeChange 方法
- 添加 EngineManager.activateMeasure 转发方法
- 修复 loadModel 错误,正确调用 Engine 组件方法
- 为 Engine 组件设置固定背景渐变色
- MeasurePanel 初始化时触发 onModeChange 回调
- 添加 MeasureMode 共享类型定义

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
yuding
2026-01-15 14:13:13 +08:00
parent cd1f8186d0
commit f6257f5162
101 changed files with 31269 additions and 29937 deletions

View File

@@ -9,15 +9,16 @@ import { getIcon } from '../../../../../utils/icon-manager';
* - 当前仅添加 UI 按钮,点击事件先留空(后续接入引擎能力再实现)
* - 使用工厂函数模式注入 engine便于未来调用 engine API
*/
export const createZoomBoxButton = (_engine: BimEngine): ButtonConfig => {
export const createZoomBoxButton = (engine: BimEngine): ButtonConfig => {
return {
id: 'zoom-box',
groupId: 'group-1',
keepActive: true,
keepActive: false,
type: 'button',
label: 'toolbar.zoomBox',
icon: getIcon('框选放大'),
onClick: () => {
engine.engine?.getEngine().rangeScale.active();
// 事件先留空:后续实现“框选放大/框选缩放”能力时再接入
// 这里不做任何动作,避免误触影响用户操作
}