correction de taille des tracés

This commit is contained in:
Gabriel Dehame 2023-03-03 21:42:28 +01:00
parent f07ff4d434
commit 3807abc2ad

View File

@ -218,7 +218,7 @@ function list_polygons(request, center, callbackRoomSelected, selectedRoom, call
// only works for third floor) // only works for third floor)
// It also changes the objects into lists of two coordinates to make it accepted by the "positions" attribute of // It also changes the objects into lists of two coordinates to make it accepted by the "positions" attribute of
// the "Polygon" react-leaflet component // the "Polygon" react-leaflet component
return [-(pt["y"] - center[1]) / 25, (pt["x"] - center[0]) / 25]; return [-(pt["y"] - center[1]) / 6, (pt["x"] - center[0]) / 6];
}); });
const pol = newPolygon(element, positions, selectedRoom, callbackRoomSelected, callbackChangeFloor); const pol = newPolygon(element, positions, selectedRoom, callbackRoomSelected, callbackChangeFloor);
polygons = [...polygons, pol]; polygons = [...polygons, pol];