New dependency system for TagDependantUIElement

This commit is contained in:
Pieter Vander Vennet 2020-07-17 14:24:31 +02:00
parent d7809b88bc
commit a8314b39e6
6 changed files with 22 additions and 15 deletions

View file

@ -28,8 +28,10 @@ class ImageCarouselWithUpload extends TagDependantUIElement {
private _imageElement: ImageCarousel;
private _pictureUploader: ImageUploadFlow;
constructor(tags: UIEventSource<any>, changes: Changes) {
super(tags);
constructor(dependencies: {tags: UIEventSource<any>, changes: Changes}) {
super(dependencies.tags);
const tags = dependencies.tags;
const changes = dependencies.changes;
this._imageElement = new ImageCarousel(tags, changes);
const userDetails = changes.login.userDetails;
const license = changes.login.GetPreference( "mapcomplete-pictures-license");