source: imaps-frontend/src/components/MapControls/MapControls.jsx@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 1.8 KB
Line 
1import React, {useEffect, useState} from "react";
2import styles from "./MapControls.module.css";
3import plusIcon from "../../assets/plus_icon.png";
4import minusIcon from "../../assets/minus_icon.png";
5import floorIcon from "../../assets/floor_icon.png";
6import HttpService from "../../scripts/net/HttpService.js";
7
8export default function MapControls({onFloorChange,mapName }) {
9 const [currentFloor, setCurrentFloor] = useState(0);
10 const [floors, setFloors] = useState([]);
11
12 // Starting floor
13
14 // Handle floor selection
15 const handleFloorChange = (newFloor) => {
16 setCurrentFloor(newFloor);
17 if (onFloorChange) {
18 onFloorChange(newFloor);
19 }
20 };
21
22 return (
23 <div className={styles.mapControl}>
24 {/* Zoom Controls */}
25 <div className={styles.zoomControls}>
26 <button className={styles.zoomButton}>
27 <img src={plusIcon} alt="Zoom In" />
28 </button>
29 <button className={styles.zoomButton}>
30 <img src={minusIcon} alt="Zoom Out" />
31 </button>
32 </div>
33
34 {/* Floor Selector */}
35 {/*<div className={styles.floorSelector}>*/}
36 {/* <img src={floorIcon} alt="Floor Icon" className={styles.floorIcon} />*/}
37 {/* <select*/}
38 {/* value={currentFloor}*/}
39 {/* onChange={(e) => handleFloorChange(parseInt(e.target.value, 10))}*/}
40 {/* className={styles.floorDropdown}*/}
41 {/* >*/}
42 {/* {floors?.map(floor => (*/}
43 {/* <option key={floor.floorNumber} value={floor.floorNumber}>*/}
44 {/* {floor.floorNumber}F*/}
45 {/* </option>*/}
46
47 {/* ))}*/}
48 {/* /!*<option value={1}>1F</option>*!/*/}
49 {/* /!*<option value={2}>2F</option>*!/*/}
50 {/* /!*<option value={3}>3F</option>*!/*/}
51 {/* /!*<option value={4}>4F</option>*!/*/}
52 {/* </select>*/}
53 {/*</div>*/}
54 </div>
55 );
56}
Note: See TracBrowser for help on using the repository browser.