Files
bim_engine/src/components/button-group/toolbar/buttons/zoom-box/index.ts

29 lines
884 B
TypeScript
Raw Normal View History

2025-12-24 19:02:34 +08:00
import type { ButtonConfig } from '../../../index.type';
import type { BimEngine } from '../../../../../bim-engine';
2025-12-25 18:57:09 +08:00
import { getIcon } from '../../../../../utils/icon-manager';
2025-12-24 19:02:34 +08:00
/**
*
2025-12-25 18:57:09 +08:00
*
2025-12-24 19:02:34 +08:00
*
* - UI
* - 使 engine便 engine API
*/
export const createZoomBoxButton = (engine: BimEngine): ButtonConfig => {
2025-12-24 19:02:34 +08:00
return {
id: 'zoom-box',
groupId: 'group-1',
keepActive: false,
2025-12-24 19:02:34 +08:00
type: 'button',
label: 'toolbar.zoomBox',
2025-12-25 18:57:09 +08:00
icon: getIcon('框选放大'),
2025-12-24 19:02:34 +08:00
onClick: () => {
engine.engine?.getEngine().rangeScale.active();
2025-12-24 19:02:34 +08:00
// 事件先留空:后续实现“框选放大/框选缩放”能力时再接入
// 这里不做任何动作,避免误触影响用户操作
}
};
};