forked from MapComplete/MapComplete
Finetuning of usage within an iFrame
This commit is contained in:
parent
45235cab0f
commit
a281381284
9 changed files with 192 additions and 119 deletions
|
|
@ -36,6 +36,11 @@ export class MenuState {
|
|||
|
||||
public readonly filtersPanelIsOpened: UIEventSource<boolean> = new UIEventSource<boolean>(false)
|
||||
public readonly privacyPanelIsOpened: UIEventSource<boolean> = new UIEventSource<boolean>(false)
|
||||
/**
|
||||
* Standalone copyright panel
|
||||
*/
|
||||
public readonly copyrightPanelIsOpened: UIEventSource<boolean> = new UIEventSource<boolean>(false)
|
||||
|
||||
public readonly communityIndexPanelIsOpened: UIEventSource<boolean> = new UIEventSource(false)
|
||||
public readonly allToggles: {
|
||||
toggle: UIEventSource<boolean>
|
||||
|
|
@ -105,6 +110,11 @@ export class MenuState {
|
|||
name: "privacy",
|
||||
showOverOthers: true,
|
||||
},
|
||||
{
|
||||
toggle: this.copyrightPanelIsOpened,
|
||||
name: "copyright",
|
||||
showOverOthers: true,
|
||||
},
|
||||
{
|
||||
toggle: this.communityIndexPanelIsOpened,
|
||||
name: "community",
|
||||
|
|
|
|||
|
|
@ -336,14 +336,16 @@ export default class LayoutConfig implements LayoutInformation {
|
|||
...json,
|
||||
layers: json.layers.filter((l) => l["id"] !== "favourite"),
|
||||
}
|
||||
this.usedImages = Array.from(
|
||||
const usedImages =
|
||||
new ExtractImages(this.official, undefined)
|
||||
.convertStrict(
|
||||
jsonNoFavourites,
|
||||
ConversionContext.construct([json.id], ["ExtractImages"])
|
||||
)
|
||||
.map((i) => i.path)
|
||||
).sort()
|
||||
.flatMap((i) => i.path)
|
||||
usedImages.sort()
|
||||
|
||||
this.usedImages = Utils.Dedup(usedImages)
|
||||
return this.usedImages
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue