feat(D 예정노선): 줌아웃 한도 인자 · 느린 조작 시간 표식 (PLAN 600-3 · 600-4 · 요구 463-27)
- 휠 부품 하한 인자 minScale(안 주면 0.5 = B05 그대로) · 예정노선 지도만 화면 폭 약 600 km(한반도)까지 뺌 - performance 표식 perfTime — 지도 다시 그림 · GL 카메라 · 바탕 · 위 그림 · 마우스 움직임(__aisloPerf 켰을 때만) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,17 @@ export function satelliteTileSource(projectId: string): SourceSpecification {
|
||||
};
|
||||
}
|
||||
|
||||
/** 느린 조작 잼(600-4) — `globalThis.__aisloPerf = true` 일 때만 `performance.measure(이름)` 으로 걸린 ms 를 남김(꺼져 있으면 그냥 실행). */
|
||||
export function perfTime<T>(name: string, run: () => T): T {
|
||||
if (!(globalThis as { __aisloPerf?: boolean }).__aisloPerf) return run();
|
||||
const start = performance.now();
|
||||
try {
|
||||
return run();
|
||||
} finally {
|
||||
performance.measure(name, { start, end: performance.now() });
|
||||
}
|
||||
}
|
||||
|
||||
export function createGlMap<K extends string>(opts: {
|
||||
/** 겹 차례(아래 → 위)와 꼴 — 밝음 · 어두움이 바뀌면 다시 부름. */
|
||||
specs: () => GlSpec<K>[];
|
||||
@@ -190,8 +201,8 @@ export function createGlMap<K extends string>(opts: {
|
||||
camera(center, zoom, bearingDeg) {
|
||||
if (!map) return;
|
||||
if (ready && themeKey() !== theme) apply();
|
||||
map.jumpTo({ center, zoom, bearing: bearingDeg });
|
||||
if (ready) map.redraw(); // 캔버스와 같은 화면(다음 화면으로 미루지 않음)
|
||||
perfTime("gl:jumpTo", () => map!.jumpTo({ center, zoom, bearing: bearingDeg }));
|
||||
if (ready) perfTime("gl:redraw", () => map!.redraw()); // 캔버스와 같은 화면(다음 화면으로 미루지 않음)
|
||||
},
|
||||
resize: () => map?.resize(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user