diff --git a/src/Map.js b/src/Map.js index 6deb5eb..80cec2d 100644 --- a/src/Map.js +++ b/src/Map.js @@ -37,16 +37,14 @@ function Lift({position, size, body}) } -function Toilet({position, size, body}) +function Toilet({position, size}) { // React class (in function form) to represent lifts, takes the position where to put the lift logo // and the body of the popup of the lift (list of floors accessible from that lift) const map = useMap(); const [markerIcon, setMarkerIcon] = useState(new L.Icon({ iconUrl: toilet, iconSize: size })); const mmap = useMapEvent('zoomend', () => {setMarkerIcon(new L.Icon({ iconUrl: toilet, iconSize: [20*Math.pow(2, map.getZoom() - 4), 20*Math.pow(2, map.getZoom() - 4)]}))}); - return - {body} - + return } function polygonCenter(polygon) @@ -161,14 +159,9 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call return callbackRoomSelected(element["id"])}}> {element["id"]} -
  • { console.log("escalier"); }}> - YAY -
  • -
  • - uéuéué -
  • - - } + {floorList(element["connexions"], callbackChangeFloor)} + + } />
    } @@ -178,14 +171,9 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call return callbackRoomSelected(element["id"])}}> {element["id"]} -
  • { console.log("ascenseur"); }}> - YAY -
  • -
  • - uéuéué -
  • - - } + {floorList(element["connexions"], callbackChangeFloor)} + + } />
    } @@ -193,16 +181,7 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call { return callbackRoomSelected(element["id"])}}> {element["id"]} - -
  • { console.log("toilettes"); }}> - YAY -
  • -
  • - uéuéué -
  • - - } - /> +
    } else if (element["type"] === "R")