Merged in fix/SW-2824-map-mobile-card-hide-pin (pull request #2458)
fix(SW-2824): move pin latitude on mobile to make space for hotel card on map * fix(SW-2824): move pin latitude on mobile to make space for hotel card on map Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -72,13 +72,17 @@ export default function SelectHotelContent({
|
||||
const hotel = hotels.find((hotel) => hotel.hotel.name === activeHotel)
|
||||
|
||||
if (hotel && hotel.hotel.location) {
|
||||
return {
|
||||
lat: hotel.hotel.location.latitude,
|
||||
lng: hotel.hotel.location.longitude,
|
||||
}
|
||||
return isAboveMobile
|
||||
? {
|
||||
lat: hotel.hotel.location.latitude,
|
||||
lng: hotel.hotel.location.longitude,
|
||||
}
|
||||
: {
|
||||
lat: hotel.hotel.location.latitude - 0.003,
|
||||
lng: hotel.hotel.location.longitude,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isAboveMobile
|
||||
? cityCoordinates
|
||||
: { ...cityCoordinates, lat: cityCoordinates.lat - 0.006 }
|
||||
@@ -208,6 +212,7 @@ export default function SelectHotelContent({
|
||||
hotelPins={filteredHotelPins}
|
||||
mapId={mapId}
|
||||
onTilesLoaded={debouncedUpdateHotelCards}
|
||||
fitBounds={isAboveMobile || !activeHotel}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user