Fix dependency injection of refactoring

This commit is contained in:
Pieter Vander Vennet 2022-02-16 01:46:55 +01:00
parent f0675a026b
commit 39e6cdfda4
4 changed files with 25 additions and 15 deletions

View file

@ -20,11 +20,7 @@ export default class ElementsState extends FeatureSwitchState {
The mapping from id -> UIEventSource<properties>
*/
public allElements: ElementStorage = new ElementStorage();
/**
THe change handler
*/
public changes: Changes;
/**
The latest element that was selected
*/
@ -48,9 +44,6 @@ export default class ElementsState extends FeatureSwitchState {
constructor(layoutToUse: LayoutConfig) {
super(layoutToUse);
// @ts-ignore
this.changes = new Changes(this, layoutToUse?.isLeftRightSensitive() ?? false)
{
// -- Location control initialization
const zoom = UIEventSource.asFloat(
QueryParameters.GetQueryParameter(
@ -85,10 +78,7 @@ export default class ElementsState extends FeatureSwitchState {
lat.setData(latlonz.lat);
lon.setData(latlonz.lon);
});
}
new ChangeToElementsActor(this.changes, this.allElements)
new PendingChangesUploader(this.changes, this.selectedElement);
}
}