forked from MapComplete/MapComplete
Refactoring: allow to export the map as PNG
This commit is contained in:
parent
e36e9123f3
commit
7f8969146a
16 changed files with 207 additions and 66 deletions
|
@ -56,20 +56,10 @@ export default class LeftControls extends Combine {
|
|||
)
|
||||
|
||||
new AllDownloads(guiState.downloadControlIsOpened, state)
|
||||
const toggledDownload = new MapControlButton(Svg.download_svg()).onClick(() =>
|
||||
guiState.downloadControlIsOpened.setData(true)
|
||||
)
|
||||
|
||||
const downloadButton = new Toggle(
|
||||
toggledDownload,
|
||||
undefined,
|
||||
state.featureSwitchEnableExport.map(
|
||||
(downloadEnabled) => downloadEnabled || state.featureSwitchExportAsPdf.data,
|
||||
[state.featureSwitchExportAsPdf]
|
||||
)
|
||||
)
|
||||
|
||||
super([currentViewAction, downloadButton])
|
||||
|
||||
super([currentViewAction])
|
||||
|
||||
this.SetClass("flex flex-col")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue