forked from MapComplete/MapComplete
Chore: rework image uploading, should work better now
This commit is contained in:
parent
6f5b0622a5
commit
94ba18785d
17 changed files with 548 additions and 238 deletions
|
@ -51,6 +51,8 @@ import ThemeViewStateHashActor from "../Logic/Web/ThemeViewStateHashActor";
|
|||
import NoElementsInViewDetector, { FeatureViewState } from "../Logic/Actors/NoElementsInViewDetector";
|
||||
import FilteredLayer from "./FilteredLayer";
|
||||
import { PreferredRasterLayerSelector } from "../Logic/Actors/PreferredRasterLayerSelector";
|
||||
import { ImageUploadManager } from "../Logic/ImageProviders/ImageUploadManager";
|
||||
import { Imgur } from "../Logic/ImageProviders/Imgur";
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -99,6 +101,8 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
readonly userRelatedState: UserRelatedState;
|
||||
readonly geolocation: GeoLocationHandler;
|
||||
|
||||
readonly imageUploadManager: ImageUploadManager
|
||||
|
||||
readonly lastClickObject: WritableFeatureSource;
|
||||
readonly overlayLayerStates: ReadonlyMap<
|
||||
string,
|
||||
|
@ -168,6 +172,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
|
||||
this.availableLayers = AvailableRasterLayers.layersAvailableAt(this.mapProperties.location);
|
||||
|
||||
|
||||
const self = this;
|
||||
this.layerState = new LayerState(this.osmConnection, layout.layers, layout.id);
|
||||
|
||||
|
@ -323,6 +328,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
this.perLayerFiltered = this.showNormalDataOn(this.map);
|
||||
|
||||
this.hasDataInView = new NoElementsInViewDetector(this).hasFeatureInView;
|
||||
this.imageUploadManager = new ImageUploadManager(layout, Imgur.singleton, this.featureProperties, this.osmConnection, this.changes)
|
||||
|
||||
this.initActors();
|
||||
this.addLastClick(lastClick);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue