chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-01-28 15:42:34 +01:00
parent 6bc8760adf
commit 0ad881316b
359 changed files with 2049 additions and 938 deletions

View file

@ -12,12 +12,10 @@ import { WithGuiState } from "./WithGuiState"
import { SpecialVisualizationState } from "../../UI/SpecialVisualization"
export class WithImageState extends WithGuiState implements SpecialVisualizationState {
readonly imageUploadManager: ImageUploadManager
readonly previewedImage = new UIEventSource<ProvidedImage>(undefined)
readonly nearbyImageSearcher: CombinedFetcher
constructor(layout: ThemeConfig, mvtAvailableLayers: Store<Set<string>>) {
super(layout, mvtAvailableLayers)
this.imageUploadManager = new ImageUploadManager(
@ -40,28 +38,23 @@ export class WithImageState extends WithGuiState implements SpecialVisualization
longAgo.setTime(new Date().getTime() - 5 * 365 * 24 * 60 * 60 * 1000)
this.nearbyImageSearcher = new CombinedFetcher(50, longAgo, this.indexedFeatures)
this.initActors()
Hash.hash.addCallbackAndRunD((hash) => {
if (hash === "current_view" || hash.match(/current_view_[0-9]+/)) {
this.selectCurrentView()
}
})
}
/**
* Setup various services for which no reference are needed
*/
private initActors() {
new ThemeViewStateHashActor({
selectedElement: this.selectedElement,
indexedFeatures: this.indexedFeatures,
guistate: this.guistate
guistate: this.guistate,
})
new PendingChangesUploader(this.changes, this.selectedElement, this.imageUploadManager)
}
}