Feat/SW-1937 destination overview map mobile
* feat(SW-1937): Added gestureHandling prop to be able to scroll past the map on the overview page * feat(SW-1937): Added active map card on overview page for smaller viewports Approved-by: Matilda Landström
This commit is contained in:
@@ -36,6 +36,14 @@ export function useSupercluster<T extends GeoJsonProperties>(
|
||||
return clusterer.getClusters(bbox, zoom)
|
||||
}, [version, clusterer, bbox, zoom])
|
||||
|
||||
function getClusterZoom(clusterId: number) {
|
||||
if (!clusterer || version === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
return clusterer.getClusterExpansionZoom(clusterId)
|
||||
}
|
||||
|
||||
// retrieve the hotel ids included in the cluster
|
||||
const containedHotels = clusters.map((cluster) => {
|
||||
if (cluster.properties?.cluster && typeof cluster.id === "number") {
|
||||
@@ -47,5 +55,6 @@ export function useSupercluster<T extends GeoJsonProperties>(
|
||||
return {
|
||||
clusters,
|
||||
containedHotels,
|
||||
getClusterZoom,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user