diff --git a/src/Map.js b/src/Map.js
index 1ab86fa..25c87e9 100644
--- a/src/Map.js
+++ b/src/Map.js
@@ -164,19 +164,6 @@ function floorList(connectedFloors, callbackChangeFloor) {
return htmlFloorList;
}
-function roomNameList(nameList) {
- // Returns under html format a list of room names
- // (without bullet points) listed in nameList
- // Auxiliary function used when creating a Room component
- let htmlNameList = [];
- for (const ind in nameList) {
- htmlNameList = [...htmlNameList,
- {nameList[ind]}
-
];
- }
- return htmlNameList;
-}
-
function newPolygon(element, positions, selectedRoom, callbackRoomSelected, callbackChangeFloor) {
// Auxiliary function to return the appropriate polygon depending
// on wether it is a room (R), a lift (L), a staircase (S), toilets (T) or corridor (C)
@@ -210,14 +197,17 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call
} else if (element['type'] === 'T') { // Toilets
content =
}
-
+ var tooltip = null;
+ if (element["names"][0] != null) {
+ tooltip = {element["names"][0]};
+ }
return callbackRoomSelected(element["id"]) }}
>
- {roomNameList(element["names"])}
+ {tooltip}
{content}
}