kcg-monitoring/frontend/src/contexts/fontScaleState.ts
htlee 44aa449b03 feat: 지도 글꼴 크기 커스텀 시스템 (4개 그룹 슬라이더)
- FontScaleContext + FontScalePanel: 시설/선박/분석/지역 4그룹 × 0.5~2.0 범위
- LAYERS 패널 하단 슬라이더 UI, localStorage 영속화
- Korea static 14개 + Iran 4개 + 분석 3개 + KoreaMap 5개 TextLayer 적용
- MapLibre 선박 라벨/국가명 실시간 반영
- 모든 useMemo deps + updateTriggers에 fontScale 포함
2026-03-24 09:27:11 +09:00

15 lines
439 B
TypeScript

import { createContext } from 'react';
export interface FontScaleConfig {
facility: number;
ship: number;
analysis: number;
area: number;
}
export const DEFAULT_FONT_SCALE: FontScaleConfig = { facility: 1.0, ship: 1.0, analysis: 1.0, area: 1.0 };
export const FontScaleCtx = createContext<{ fontScale: FontScaleConfig; setFontScale: (c: FontScaleConfig) => void }>({
fontScale: DEFAULT_FONT_SCALE, setFontScale: () => {},
});