1 | import React, {useEffect, useState} from "react";
|
---|
2 | import styles from "./MapControls.module.css";
|
---|
3 | import plusIcon from "../../assets/plus_icon.png";
|
---|
4 | import minusIcon from "../../assets/minus_icon.png";
|
---|
5 | import floorIcon from "../../assets/floor_icon.png";
|
---|
6 | import HttpService from "../../scripts/net/HttpService.js";
|
---|
7 |
|
---|
8 | export 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 | }
|
---|