CSS: set panes to 100% width so that popups fill max-width (#9765)

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
This commit is contained in:
Iván Sánchez Ortega
2025-07-07 13:25:27 +02:00
committed by GitHub
parent eae77baac2
commit 242f257440
2 changed files with 3 additions and 8 deletions

View File

@ -62,9 +62,9 @@ export const Popup = DivOverlay.extend({
// Max width of the popup, in pixels.
maxWidth: 300,
// @option minWidth: Number = 100
// @option minWidth: Number = 50
// Min width of the popup, in pixels.
minWidth: 100,
minWidth: 50,
// @option maxHeight: Number = null
// If set, creates a scrollable container of the given height
@ -250,14 +250,8 @@ export const Popup = DivOverlay.extend({
const container = this._contentNode,
style = container.style;
style.width = '';
style.whiteSpace = 'nowrap';
style.maxWidth = `${this.options.maxWidth}px`;
style.minWidth = `${this.options.minWidth}px`;
style.whiteSpace = '';
style.height = '';
const height = this._containerHeight ?? container.offsetHeight,
maxHeight = this.options.maxHeight,

View File

@ -13,6 +13,7 @@
position: absolute;
left: 0;
top: 0;
width:100%;
}
.leaflet-container {
overflow: hidden;