Chore: housekeeping, linting

This commit is contained in:
Pieter Vander Vennet 2025-06-04 00:21:28 +02:00
parent f942529755
commit 30d00eb06d
74 changed files with 998 additions and 623 deletions

View file

@ -50,10 +50,10 @@
let license: LicenseInfo = {
artist: image.author,
license: image.license,
informationLocation: (image.detailsUrl ?? image.pictureUrl ?? image.thumbUrl),
date
informationLocation: image.detailsUrl ?? image.pictureUrl ?? image.thumbUrl,
date,
}
let providedImage: ProvidedImage = {
url: image.thumbUrl ?? image.pictureUrl,
url_hd: image.pictureUrl,

View file

@ -149,30 +149,32 @@
},
})
let nearbyFeatures: Store<Feature<Geometry, HotspotProperties>[]> = asFeatures.map((nearbyPoints) => {
return [
{
type: "Feature",
geometry: { type: "Point", coordinates: GeoOperations.centerpointCoordinates(feature) },
properties: <HotspotProperties>{
name: layer.title?.GetRenderValue(feature.properties).Subs(feature.properties).txt,
focus: true,
},
},
...nearbyPoints
.filter((p) => p.properties["spherical"] === "yes")
.map((f) => ({
...f,
let nearbyFeatures: Store<Feature<Geometry, HotspotProperties>[]> = asFeatures.map(
(nearbyPoints) => {
return [
{
type: "Feature",
geometry: { type: "Point", coordinates: GeoOperations.centerpointCoordinates(feature) },
properties: <HotspotProperties>{
name: "Nearby panorama",
pitch: "auto",
type: "scene",
gotoPanorama: f,
focus: false
name: layer.title?.GetRenderValue(feature.properties).Subs(feature.properties).txt,
focus: true,
},
})),
]
})
},
...nearbyPoints
.filter((p) => p.properties["spherical"] === "yes")
.map((f) => ({
...f,
properties: <HotspotProperties>{
name: "Nearby panorama",
pitch: "auto",
type: "scene",
gotoPanorama: f,
focus: false,
},
})),
]
}
)
onDestroy(
tags.addCallbackAndRunD((tags) => {

View file

@ -35,10 +35,13 @@
// We thus have to check the remappings!
const remappings = state.changes._changesetHandler._remappings
const remappedFeatureId = remappings.get(featureId) ?? featureId
return ids.filter((itemId) => itemId === featureId ||
itemId === remappedFeatureId ||
(remappings.get(itemId) ?? itemId === featureId) ||
(remappings.get(itemId) ?? itemId === remappedFeatureId)).length
return ids.filter(
(itemId) =>
itemId === featureId ||
itemId === remappedFeatureId ||
(remappings.get(itemId) ?? itemId === featureId) ||
(remappings.get(itemId) ?? itemId === remappedFeatureId)
).length
})
}

View file

@ -112,7 +112,12 @@ export class PhotoSphereViewerWrapper {
} else if (!isNaN(f.properties.pitch)) {
pitch = f.properties.pitch
}
const distance = Math.round(GeoOperations.distanceBetween(centralImageLocation, GeoOperations.centerpointCoordinates(f)))
const distance = Math.round(
GeoOperations.distanceBetween(
centralImageLocation,
GeoOperations.centerpointCoordinates(f)
)
)
this.viewer.addHotSpot(
{
type: f.properties.gotoPanorama !== undefined ? "scene" : "info",