Merge master

This commit is contained in:
Pieter Vander Vennet 2025-06-16 20:32:27 +02:00
commit 3659276351
84 changed files with 3508 additions and 3472 deletions

View file

@ -14,7 +14,6 @@ import {
} from "geojson"
import { Tiles } from "../Models/TileRange"
import { Utils } from "../Utils"
;("use strict")
export class GeoOperations {

View file

@ -124,9 +124,7 @@ export default abstract class ImageProvider {
value: string
): undefined | ProvidedImage[] | Promise<ProvidedImage[]>
public abstract DownloadAttribution(providedImage: {
id: string
}): Promise<LicenseInfo>
public abstract DownloadAttribution(providedImage: { id: string }): Promise<LicenseInfo>
public abstract apiUrls(): string[]
@ -142,7 +140,7 @@ export default abstract class ImageProvider {
id: string
}): Promise<Feature<Point, PanoramaView>> | undefined
public static async offerImageAsDownload(image: { url_hd?: string, url: string }) {
public static async offerImageAsDownload(image: { url_hd?: string; url: string }) {
const response = await fetch(image.url_hd ?? image.url)
const blob = await response.blob()
Utils.offerContentsAsDownloadableFile(blob, new URL(image.url).pathname.split("/").at(-1), {

View file

@ -170,7 +170,8 @@ export class Mapillary extends ImageProvider {
properties: {
url: response.thumb_2048_url,
northOffset: response.computed_compass_angle,
provider: this
provider: this,
imageMeta: <any>image,
},
}
}

View file

@ -208,9 +208,7 @@ export default class PanoramaxImageProvider extends ImageProvider {
return Stores.ListStabilized(source)
}
public async DownloadAttribution(providedImage: {
id: string
}): Promise<LicenseInfo> {
public async DownloadAttribution(providedImage: { id: string }): Promise<LicenseInfo> {
const meta = await this.getInfoFor(providedImage.id)
return {
@ -250,7 +248,7 @@ export default class PanoramaxImageProvider extends ImageProvider {
northOffset,
pitchOffset,
provider: this,
imageMeta: imageInfo
imageMeta: imageInfo,
},
}
}

View file

@ -3,7 +3,11 @@
* The image preview allows to drag and zoom in to the image
*/
import panzoom from "panzoom"
import type { HotspotProperties, PanoramaView, ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
import type {
HotspotProperties,
PanoramaView,
ProvidedImage,
} from "../../Logic/ImageProviders/ImageProvider"
import ImageProvider from "../../Logic/ImageProviders/ImageProvider"
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import Zoomcontrol from "../Zoomcontrol"
@ -15,7 +19,7 @@
export let nearbyFeatures:
| Feature<Geometry, HotspotProperties>[]
| Store<Feature<Geometry, HotspotProperties>[]> = []
export let image: Partial<ProvidedImage> & { url: string, id: string }
export let image: Partial<ProvidedImage> & { url: string; id: string }
let panzoomInstance = undefined
let panzoomEl: HTMLElement
let viewerEl: HTMLElement
@ -34,7 +38,7 @@
return
}
const viewer = new PhotoSphereViewerWrapper(viewerEl, imageInfo)
viewer.imageInfo.addCallbackAndRunD(panoramaInfo => {
viewer.imageInfo.addCallbackAndRunD((panoramaInfo) => {
let provider: ImageProvider
if (typeof panoramaInfo.properties.provider === "string") {
provider = AllImageProviders.byName(panoramaInfo.properties.provider)

View file

@ -28,9 +28,10 @@
export let feature: Feature
export let layer: LayerConfig
export let highlighted: UIEventSource<string> = undefined
export let nearbyFeatures: Feature<Point, HotspotProperties>[] | Store<Feature<Point, HotspotProperties>[]> = []
export let nearbyFeatures:
| Feature<Point, HotspotProperties>[]
| Store<Feature<Point, HotspotProperties>[]> = []
export let linkable = true
let targetValue = Object.values(image.osmTags)[0]
let isLinked = new UIEventSource(Object.values(tags.data).some((v) => targetValue === v))

View file

@ -68,7 +68,7 @@
northOffset: p4c.direction,
rotation: p4c.direction,
spherical: p4c.details.isSpherical ? "yes" : "no",
provider: p4c.provider
provider: p4c.provider,
},
}
)

View file

@ -6,7 +6,8 @@ import { HotspotProperties, PanoramaView } from "../../Logic/ImageProviders/Imag
import { Store, UIEventSource } from "../../Logic/UIEventSource"
export class PhotoSphereViewerWrapper {
private _imageInfo: UIEventSource<NonNullable<Feature<Point, PanoramaView>>> = new UIEventSource(undefined)
private _imageInfo: UIEventSource<NonNullable<Feature<Point, PanoramaView>>> =
new UIEventSource(undefined)
public imageInfo: Store<NonNullable<Feature<Point, PanoramaView>>> = this._imageInfo
private readonly viewer: Pannellum.Viewer
private nearbyFeatures: Feature<Geometry, HotspotProperties>[] = []
@ -39,13 +40,12 @@ export class PhotoSphereViewerWrapper {
compass: true,
showControls: false,
northOffset: imageInfo.properties.northOffset,
horizonPitch: imageInfo.properties.pitchOffset
horizonPitch: imageInfo.properties.pitchOffset,
},
},
})
this.setNearbyFeatures(nearbyFeatures)
}
public calculatePitch(feature: Feature): number {
@ -91,7 +91,6 @@ export class PhotoSphereViewerWrapper {
this.viewer.loadScene(imageInfo.properties.url, 0, imageInfo.properties.northOffset)
this.setNearbyFeatures(this.nearbyFeatures)
this._imageInfo.set(imageInfo)
}
private clearHotspots() {

View file

@ -83,6 +83,6 @@
<div class={sideTextClass}>{$sideTextSub}</div>
{/if}
</div>
<a href={$url} target="_blank" class="subtle text-xs break-all">{$url}</a>
<a href={$url} target="_blank" class="subtle break-all text-xs">{$url}</a>
</div>
{/if}

View file

@ -1,7 +1,7 @@
{
"contributors": [
{
"commits": 9825,
"commits": 9857,
"contributor": "Pieter Vander Vennet"
},
{

View file

@ -498,13 +498,15 @@
"en"
],
"PL": [
"pl",
"pl"
],
"PS": [
"ar",
"ar"
],
"PT": [
"pt"
],
"PW": [
"en",
"ja"

View file

@ -1,5 +1,6 @@
{
"ca": "català",
"cs": "čeština",
"cy": "Cymraeg",
"da": "dansk",
"de": "Deutsch",
@ -25,7 +26,6 @@
"sl": "slovenščina",
"sv": "svenska",
"uk": "українська мова",
"zgh": "ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ ⵜⴰⵎⵖⵔⵉⴱⵉⵜ",
"zh_Hans": "简体中文",
"zh_Hant": "繁體中文"
}

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,7 @@
"contributor": "paunofu"
},
{
"commits": 154,
"commits": 172,
"contributor": "Anonymous"
},
{
@ -41,7 +41,7 @@
"contributor": "danieldegroot2"
},
{
"commits": 59,
"commits": 67,
"contributor": "Supaplex"
},
{
@ -120,6 +120,10 @@
"commits": 15,
"contributor": "WaldiS"
},
{
"commits": 14,
"contributor": "small"
},
{
"commits": 14,
"contributor": "LeJun"
@ -130,7 +134,11 @@
},
{
"commits": 13,
"contributor": "small"
"contributor": "Lukáš Jelínek"
},
{
"commits": 13,
"contributor": "Weblate Admin"
},
{
"commits": 13,
@ -144,10 +152,6 @@
"commits": 13,
"contributor": "Joost"
},
{
"commits": 12,
"contributor": "Weblate Admin"
},
{
"commits": 12,
"contributor": "hugoalh"
@ -236,10 +240,6 @@
"commits": 8,
"contributor": "Vinicius"
},
{
"commits": 7,
"contributor": "Lukáš Jelínek"
},
{
"commits": 7,
"contributor": "Franco"
@ -604,6 +604,10 @@
"commits": 2,
"contributor": "Leo Alcaraz"
},
{
"commits": 1,
"contributor": "POG"
},
{
"commits": 1,
"contributor": "Manuel"