mirror of
https://gitlab.aliens-lyon.fr/encartes/web-interface.git
synced 2026-03-17 22:51:04 +01:00
name->names
This commit is contained in:
parent
28e4816e79
commit
3319d8d04d
@ -180,11 +180,12 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call
|
||||
// and for S or L, we add a Popup with the list of connected floors and possibility to load the
|
||||
// map of a connected floor
|
||||
const color = selectedRoom === element["id"] ? 'red' : 'grey';
|
||||
console.log(element);
|
||||
if (element["type"] === "S")
|
||||
{
|
||||
// In this case, the room is a staircase so we add a Stairs component
|
||||
return <Polygon positions={positions} key={element["id"] + color} color={color} evenHandlers={{click: () => callbackRoomSelected(element["id"])}}>
|
||||
<Tooltip>{element["name"]}</Tooltip>
|
||||
<Tooltip>{element["names"]}</Tooltip>
|
||||
<Stairs position={polygonCenter(positions)} size={logoSize(positions)} body={<Popup>
|
||||
{floorList(element["connectedFloors"], callbackChangeFloor)}
|
||||
</Popup>
|
||||
@ -196,7 +197,7 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call
|
||||
{
|
||||
// In this case the room is a lift so we add a Lift component
|
||||
return <Polygon positions={positions} key={element["id"] + color} color={color} evenHandlers={{click: () => callbackRoomSelected(element["id"])}}>
|
||||
<Tooltip>{element["name"]}</Tooltip>
|
||||
<Tooltip>{element["names"]}</Tooltip>
|
||||
<Lift position={polygonCenter(positions)} size={logoSize(positions)} body={<Popup>
|
||||
{floorList(element["connectedFloors"], callbackChangeFloor)}
|
||||
</Popup>
|
||||
@ -207,7 +208,7 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call
|
||||
else if (element["type"] === "T")
|
||||
{
|
||||
return <Polygon positions={positions} key={element["id"] + color} color={color} evenHandlers={{click: () => callbackRoomSelected(element["id"])}}>
|
||||
<Tooltip>{element["name"]}</Tooltip>
|
||||
<Tooltip>{element["names"]}</Tooltip>
|
||||
<Toilet position={polygonCenter(positions)} size={logoSize(positions)}/>
|
||||
</Polygon>
|
||||
}
|
||||
@ -215,7 +216,7 @@ function newPolygon(element, positions, selectedRoom, callbackRoomSelected, call
|
||||
{
|
||||
// In this case it is a regular room
|
||||
return <Polygon positions={positions} key={element["id"] + color} color={color} eventHandlers={{click: () => callbackRoomSelected(element["id"])}}>
|
||||
<Tooltip>{element["name"]}</Tooltip>
|
||||
<Tooltip>{element["names"]}</Tooltip>
|
||||
</Polygon>
|
||||
}
|
||||
else if (element["type"] === "C")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user