forked from MapComplete/MapComplete
Many tweaks to use MC in an iframe with less clutter
This commit is contained in:
parent
894b0d45ca
commit
f88cb9a730
19 changed files with 384 additions and 236 deletions
|
|
@ -120,6 +120,11 @@ export class MenuState {
|
|||
name: "community",
|
||||
showOverOthers: true,
|
||||
},
|
||||
{
|
||||
toggle: this.filtersPanelIsOpened,
|
||||
name: "filters",
|
||||
showOverOthers: true,
|
||||
},
|
||||
{
|
||||
toggle: this.menuIsOpened,
|
||||
name: "menu",
|
||||
|
|
@ -135,11 +140,7 @@ export class MenuState {
|
|||
name: "background",
|
||||
showOverOthers: true,
|
||||
},
|
||||
{
|
||||
toggle: this.filtersPanelIsOpened,
|
||||
name: "filters",
|
||||
showOverOthers: true,
|
||||
},
|
||||
|
||||
]
|
||||
for (const toggle of this.allToggles) {
|
||||
toggle.toggle.addCallback((isOpen) => {
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ export default class PointRenderingConfig extends WithContextLoader {
|
|||
?.SetClass("flex items-center justify-center absolute marker-label")
|
||||
?.SetClass(cssClassesLabel)
|
||||
if (cssLabel) {
|
||||
label.SetStyle(cssLabel)
|
||||
label?.SetStyle(cssLabel)
|
||||
} else if (labelOnly) {
|
||||
return label?.SetStyle("transform: translate(-50%, -50%);")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
)
|
||||
this.favourites = new FavouritesFeatureSource(this)
|
||||
|
||||
this.featureSummary = this.setupSummaryLayer()
|
||||
this.featureSummary = this.setupSummaryLayer(new LayerConfig(<LayerConfigJson> summaryLayer, "summaryLayer", true))
|
||||
this.toCacheSavers = this.initSaveToLocalStorage()
|
||||
this.initActors()
|
||||
this.drawSpecialLayers()
|
||||
|
|
@ -681,7 +681,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
)
|
||||
}
|
||||
|
||||
private setupSummaryLayer(): SummaryTileSourceRewriter {
|
||||
private setupSummaryLayer(summaryLayerConfig: LayerConfig): SummaryTileSourceRewriter {
|
||||
/**
|
||||
* MaxZoom for the summary layer
|
||||
*/
|
||||
|
|
@ -707,7 +707,9 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
isActive: this.mapProperties.zoom.map((z) => z < maxzoom),
|
||||
}
|
||||
)
|
||||
return new SummaryTileSourceRewriter(summaryTileSource, this.layerState.filteredLayers)
|
||||
|
||||
const src =new SummaryTileSourceRewriter(summaryTileSource, this.layerState.filteredLayers)
|
||||
return src
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -793,10 +795,10 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
selectedElement: this.selectedElement,
|
||||
})
|
||||
})
|
||||
|
||||
const summaryLayerConfig = new LayerConfig(<LayerConfigJson>summaryLayer, "summaryLayer")
|
||||
new ShowDataLayer(this.map, {
|
||||
features: specialLayers.summary,
|
||||
layer: new LayerConfig(<LayerConfigJson>summaryLayer, "summaryLayer"),
|
||||
layer: summaryLayerConfig,
|
||||
// doShowLayer: this.mapProperties.zoom.map((z) => z < maxzoom),
|
||||
selectedElement: this.selectedElement,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue