fix: honour carriage returns in permanent credits (#2206)

fix #2197

The fix here is to add the `text` class, the rest is cleaning.
This commit is contained in:
Yohan Boniface 2024-10-10 19:48:37 +02:00 committed by GitHub
commit 6b37e4792f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -453,17 +453,13 @@ U.PermanentCreditsControl = L.Control.extend({
},
onAdd: function () {
const paragraphContainer = L.DomUtil.create(
this.paragraphContainer = L.DomUtil.create(
'div',
'umap-permanent-credits-container'
'umap-permanent-credits-container text'
)
const creditsParagraph = L.DomUtil.create('p', '', paragraphContainer)
this.paragraphContainer = paragraphContainer
this.setCredits()
this.setBackground()
return paragraphContainer
return this.paragraphContainer
},
setCredits: function () {