- FontScaleContext + FontScalePanel: 시설/선박/분석/지역 4그룹 × 0.5~2.0 범위 - LAYERS 패널 하단 슬라이더 UI, localStorage 영속화 - Korea static 14개 + Iran 4개 + 분석 3개 + KoreaMap 5개 TextLayer 적용 - MapLibre 선박 라벨/국가명 실시간 반영 - 모든 useMemo deps + updateTriggers에 fontScale 포함
11 lines
498 B
TypeScript
11 lines
498 B
TypeScript
import type { ReactNode } from 'react';
|
|
import { useLocalStorage } from '../hooks/useLocalStorage';
|
|
import { FontScaleCtx, DEFAULT_FONT_SCALE } from './fontScaleState';
|
|
|
|
export type { FontScaleConfig } from './fontScaleState';
|
|
|
|
export function FontScaleProvider({ children }: { children: ReactNode }) {
|
|
const [fontScale, setFontScale] = useLocalStorage('mapFontScale', DEFAULT_FONT_SCALE);
|
|
return <FontScaleCtx.Provider value={{ fontScale, setFontScale }}>{children}</FontScaleCtx.Provider>;
|
|
}
|