Skip to content

Commit

Permalink
Move pvPoints 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 1e7f746 commit e881c2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/ThreeViewer/Scene.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const Scene = ({
setSelectedMesh,
selectedPVSystem,
setSelectedPVSystem,
pvPoints,
setPVPoints,
vegetationGeometries,
geoLocation,
}) => {
// 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([])
// pvPoints are the red points that appear when drawing PV systems
const [pvPoints, setPVPoints] = useState([])

window.setPVPoints = setPVPoints
const position = [
Expand Down
5 changes: 0 additions & 5 deletions src/pages/Simulation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ function Index() {
// simulationProgress is used for the loading bar
const [simulationProgress, setSimulationProgress] = useState(0)

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

// The federal State where the material comes from, ie "BY"
const [federalState, setFederalState] = useState(false)
window.setFederalState = setFederalState
Expand Down Expand Up @@ -71,8 +68,6 @@ function Index() {
setSelectedMesh={setSelectedMesh}
selectedPVSystem={selectedPVSystem}
setSelectedPVSystem={setSelectedPVSystem}
pvPoints={pvPoints}
setPVPoints={setPVPoints}
vegetationGeometries={vegetationGeometries}
geoLocation={location}
/>
Expand Down

0 comments on commit e881c2e

Please sign in to comment.