forked from MapComplete/MapComplete
New dependency system for TagDependantUIElement
This commit is contained in:
parent
d7809b88bc
commit
a8314b39e6
6 changed files with 22 additions and 15 deletions
|
@ -41,12 +41,13 @@ export class FeatureInfoBox extends UIElement {
|
|||
this._userDetails = userDetails;
|
||||
this.ListenTo(userDetails);
|
||||
|
||||
const deps = {tags:this._tagsES , changes:this._changes}
|
||||
|
||||
this._infoboxes = [];
|
||||
elementsToShow = elementsToShow ?? []
|
||||
for (const tagRenderingOption of elementsToShow) {
|
||||
this._infoboxes.push(
|
||||
tagRenderingOption.construct(this._tagsES, this._changes));
|
||||
tagRenderingOption.construct(deps));
|
||||
}
|
||||
|
||||
title = title ?? new TagRenderingOptions(
|
||||
|
@ -55,9 +56,9 @@ export class FeatureInfoBox extends UIElement {
|
|||
}
|
||||
)
|
||||
|
||||
this._title = new TagRenderingOptions(title.options).construct(this._tagsES, this._changes);
|
||||
this._osmLink =new OsmLink().construct(this._tagsES, this._changes);
|
||||
this._wikipedialink = new WikipediaLink().construct(this._tagsES, this._changes);
|
||||
this._title = new TagRenderingOptions(title.options).construct(deps);
|
||||
this._osmLink =new OsmLink().construct(deps);
|
||||
this._wikipedialink = new WikipediaLink().construct(deps);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue