fix: restore scene preview styles

This commit is contained in:
que01 committed 2026-08-26 15:09:27 +08:00
1 parent 89b402de7a
commit 4133a5244a
5 files changed
+46 -1

No files matched your search

@@ -20,13 +20,15 @@ export function MapCanvas({ state, selected, visible, scene, onSelectRoad, onFea
const layersRef = useRef<ReturnType<typeof createLayers> | null>(null);
const selectedRef = useRef<Road | null>(selected);
const stateRef = useRef(state);
const sceneRef = useRef(scene);
selectedRef.current = selected;
stateRef.current = state;
sceneRef.current = scene;
useEffect(() => {
if (!target.current) return;
const layers = createLayers(
() => selectedRef.current,
() => scene,
() => sceneRef.current,
);
layersRef.current = layers;
const map = new Map({