Fix dasharrays, add custom size PNG export

This commit is contained in:
Pieter Vander Vennet 2024-04-01 01:39:04 +02:00
parent faff07d231
commit a79675c879
7 changed files with 52 additions and 7 deletions

View file

@ -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