Skip to content

Commit e881c2e

Browse files
committed
Move pvPoints State to scene #332
1 parent 1e7f746 commit e881c2e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/components/ThreeViewer/Scene.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ const Scene = ({
2323
setSelectedMesh,
2424
selectedPVSystem,
2525
setSelectedPVSystem,
26-
pvPoints,
27-
setPVPoints,
2826
vegetationGeometries,
2927
geoLocation,
3028
}) => {
3129
// showTerrain decides if the underlying Map is visible or not
3230
const [showTerrain, setShowTerrain] = useState(true)
3331
// A list of visible PV Systems - they get visible after they are drawn on a building and calculated
3432
const [pvSystems, setPVSystems] = useState([])
33+
// pvPoints are the red points that appear when drawing PV systems
34+
const [pvPoints, setPVPoints] = useState([])
3535

3636
window.setPVPoints = setPVPoints
3737
const position = [

src/pages/Simulation.jsx

-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ function Index() {
1616
// simulationProgress is used for the loading bar
1717
const [simulationProgress, setSimulationProgress] = useState(0)
1818

19-
// pvPoints are the red points that appear when drawing PV systems
20-
const [pvPoints, setPVPoints] = useState([])
21-
2219
// The federal State where the material comes from, ie "BY"
2320
const [federalState, setFederalState] = useState(false)
2421
window.setFederalState = setFederalState
@@ -71,8 +68,6 @@ function Index() {
7168
setSelectedMesh={setSelectedMesh}
7269
selectedPVSystem={selectedPVSystem}
7370
setSelectedPVSystem={setSelectedPVSystem}
74-
pvPoints={pvPoints}
75-
setPVPoints={setPVPoints}
7671
vegetationGeometries={vegetationGeometries}
7772
geoLocation={location}
7873
/>

0 commit comments

Comments
 (0)