diff --git a/src/features/planSimulation/components/Simulation.tsx b/src/features/planSimulation/components/Simulation.tsx index 40c36432..77280c87 100644 --- a/src/features/planSimulation/components/Simulation.tsx +++ b/src/features/planSimulation/components/Simulation.tsx @@ -171,7 +171,7 @@ const Simulation = () => { useState(); const levelsLoaded = useRef([]); const [showUploadModal, setShowUploadModal] = useState(false); - const [statsMetadata, setStatsMetadata] = useState({}); + // const [statsMetadata, setStatsMetadata] = useState({}); const [statsLayerMetadata, setStatsLayerMetadata] = useState({}); @@ -302,7 +302,7 @@ const Simulation = () => { setResetMap(true); setParentMapData(undefined); setShowResult(false); - setStatsMetadata({}); + // setStatsMetadata({}); setMarkedLocations([]); setMarkedParents(new Set()); @@ -459,21 +459,21 @@ const Simulation = () => { setMapDataLoad(mapDataSave); }; - const statsHandler = (message: MessageEvent) => { - const statsIncoming = JSON.parse(message.data); - setStatsMetadata(statsMetadata => { - let newStats: Stats = {}; - Object.keys(statsMetadata).forEach(key => { - newStats[key] = statsMetadata[key]; - }); - Object.keys(statsIncoming).forEach(key => { - if (!newStats[key]) { - newStats[key] = statsIncoming[key]; - } - }); - return newStats; - }); - }; + // const statsHandler = (message: MessageEvent) => { + // const statsIncoming = JSON.parse(message.data); + // setStatsMetadata(statsMetadata => { + // let newStats: Stats = {}; + // Object.keys(statsMetadata).forEach(key => { + // newStats[key] = statsMetadata[key]; + // }); + // Object.keys(statsIncoming).forEach(key => { + // if (!newStats[key]) { + // newStats[key] = statsIncoming[key]; + // } + // }); + // return newStats; + // }); + // }; const statsHandlerAfterAnalysis = (message: MessageEvent, analysisLayer: AnalysisLayer) => { // const statsIncoming = JSON.parse(message.data); diff --git a/src/features/planSimulation/components/SimulationMapView/SimulationMapView.tsx b/src/features/planSimulation/components/SimulationMapView/SimulationMapView.tsx index 2ce463e3..c967129d 100644 --- a/src/features/planSimulation/components/SimulationMapView/SimulationMapView.tsx +++ b/src/features/planSimulation/components/SimulationMapView/SimulationMapView.tsx @@ -34,7 +34,7 @@ import { import { ColorPicker, Color, useColor } from 'react-color-palette'; import 'react-color-palette/lib/css/styles.css'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Children, Stats, StatsLayer } from '../Simulation'; +import { Children, StatsLayer } from '../Simulation'; import ActionDialog from '../../../../components/Dialogs/ActionDialog'; import MapboxDraw from '@mapbox/mapbox-gl-draw'; import { AnalysisLayer } from '../Simulation';