mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-23 00:14:09 +00:00
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:

committed by
GitHub

parent
eae77baac2
commit
242f257440
@ -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,
|
||||
|
@ -13,6 +13,7 @@
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width:100%;
|
||||
}
|
||||
.leaflet-container {
|
||||
overflow: hidden;
|
||||
|
Reference in New Issue
Block a user