web-map/src/apis/map/constant.ts
2025-04-20 00:49:14 +08:00

64 lines
1.3 KiB
TypeScript

import { KeydownType, type Options } from '@meta2d/core';
//#region 点位
export enum MapPointType {
= 1,
,
,
,
= 11,
,
,
,
,
= 99,
}
export const MAP_POINT_TYPES = Object.freeze(
<[string, MapPointType][]>Object.entries(MapPointType).filter(([, v]) => typeof v === 'number'),
);
//#endregion
//#region 线路
export enum MapRouteType {
线 = 'line',
线 = 'bezier3',
}
export const MAP_ROUTE_TYPES = Object.freeze(<[string, MapRouteType][]>Object.entries(MapRouteType));
//#endregion
//#region 区域
export enum MapAreaType {
= 1,
= 11,
,
}
export const MAP_AREA_TYPES = Object.freeze(
<[string, MapAreaType][]>Object.entries(MapAreaType).filter(([, v]) => typeof v === 'number'),
);
//#endregion
export const EDITOR_CONFIG: Options = {
keydown: KeydownType.None,
strictScope: true,
moveConnectedLine: false,
textRotate: false,
textFlip: false,
disableInput: true,
disableRotate: true,
disableSize: true,
disableAnchor: true,
disableEmptyLine: true,
disableRepeatLine: true,
minScale: 0.19,
maxScale: 2.01,
scaleOff: 0.01,
defaultAnchors: [],
fontSize: 14,
lineHeight: 1.5,
textAlign: 'center',
textBaseline: 'top',
};