2025-12-24 19:02:34 +08:00
|
|
|
import type { ButtonConfig } from '../../../index.type';
|
2025-12-25 18:57:09 +08:00
|
|
|
import { getIcon } from '../../../../../utils/icon-manager';
|
2026-01-22 15:23:57 +08:00
|
|
|
import { ManagerRegistry } from '../../../../../core/manager-registry';
|
2025-12-24 19:02:34 +08:00
|
|
|
|
2026-01-22 15:23:57 +08:00
|
|
|
export const createZoomBoxButton = (): ButtonConfig => {
|
|
|
|
|
return {
|
|
|
|
|
id: 'zoom-box',
|
|
|
|
|
groupId: 'group-1',
|
|
|
|
|
keepActive: false,
|
|
|
|
|
type: 'button',
|
|
|
|
|
label: 'toolbar.zoomBox',
|
|
|
|
|
icon: getIcon('框选放大'),
|
|
|
|
|
onClick: () => {
|
|
|
|
|
const registry = ManagerRegistry.getInstance();
|
|
|
|
|
registry.engine3d?.getEngine().rangeScale.active();
|
|
|
|
|
}
|
|
|
|
|
};
|
2025-12-24 19:02:34 +08:00
|
|
|
};
|