mirror of
https://github.com/immich-app/immich.git
synced 2025-11-24 17:30:43 +09:00
@@ -53,22 +53,15 @@
|
||||
dispatch('selected', [assetId]);
|
||||
}
|
||||
|
||||
function handleClusterClick(clusterId: number, map: Map | null) {
|
||||
async function handleClusterClick(clusterId: number, map: Map | null) {
|
||||
if (!map) {
|
||||
return;
|
||||
}
|
||||
|
||||
const mapSource = map?.getSource('geojson') as GeoJSONSource;
|
||||
mapSource.getClusterLeaves(clusterId, 10_000, 0, (error, leaves) => {
|
||||
if (error) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (leaves) {
|
||||
const ids = leaves.map((leaf) => leaf.properties?.id);
|
||||
dispatch('selected', ids);
|
||||
}
|
||||
});
|
||||
const leaves = await mapSource.getClusterLeaves(clusterId, 10_000, 0);
|
||||
const ids = leaves.map((leaf) => leaf.properties?.id);
|
||||
dispatch('selected', ids);
|
||||
}
|
||||
|
||||
function handleMapClick(event: maplibregl.MapMouseEvent) {
|
||||
|
||||
Reference in New Issue
Block a user