Skip to content

Commit

Permalink
Move pvSystems state to Scene #332
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianK13 committed Oct 18, 2024
1 parent 8d7cef8 commit 1e7f746
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/ThreeViewer/Scene.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const Scene = ({
geometries,
simulationMeshes,
setSimulationMeshes,
pvSystems,
setPVSystems,
selectedMesh,
setSelectedMesh,
selectedPVSystem,
Expand All @@ -32,6 +30,8 @@ const Scene = ({
}) => {
// showTerrain decides if the underlying Map is visible or not
const [showTerrain, setShowTerrain] = useState(true)
// A list of visible PV Systems - they get visible after they are drawn on a building and calculated
const [pvSystems, setPVSystems] = useState([])

window.setPVPoints = setPVPoints
const position = [
Expand Down
5 changes: 1 addition & 4 deletions src/pages/Simulation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ function Index() {

// simulationProgress is used for the loading bar
const [simulationProgress, setSimulationProgress] = useState(0)
// A list of visible PV Systems - they get visible after they are drawn on a building and calculated
const [pvSystems, setPVSystems] = useState([])

// pvPoints are the red points that appear when drawing PV systems
const [pvPoints, setPVPoints] = useState([])

Expand Down Expand Up @@ -68,8 +67,6 @@ function Index() {
geometries={geometries}
simulationMeshes={simulationMeshes}
setSimulationMeshes={setSimulationMeshes}
pvSystems={pvSystems}
setPVSystems={setPVSystems}
selectedMesh={selectedMesh}
setSelectedMesh={setSelectedMesh}
selectedPVSystem={selectedPVSystem}
Expand Down

0 comments on commit 1e7f746

Please sign in to comment.