forked from MapComplete/MapComplete
Fix dasharrays, add custom size PNG export
This commit is contained in:
parent
faff07d231
commit
a79675c879
7 changed files with 52 additions and 7 deletions
|
@ -357,7 +357,8 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
const targetW = Math.max(element.getBoundingClientRect().width * 4,
|
||||
...labels.map(l => l.getBoundingClientRect().width))
|
||||
const targetH = element.getBoundingClientRect().height +
|
||||
Math.max(...labels.map(l => l.getBoundingClientRect().height))
|
||||
Math.max(...labels.map(l => l.getBoundingClientRect().height * 2 /* A bit of buffer to catch eventual 'margin-top'*/))
|
||||
|
||||
// Force a wider view for icon badges
|
||||
element.style.width = targetW + "px"
|
||||
// Force more height to include labels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue