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