mirror of
https://github.com/itsdave-de/fusionpbx_connect.git
synced 2025-05-06 15:45:15 +02:00
init_map without resize map
This commit is contained in:
parent
296452214e
commit
41d61f0880
@ -24,7 +24,7 @@ function create_dialog_and_init_map(frm) {
|
||||
const modalDialog = dialog.$wrapper.find('.modal-content');
|
||||
modalDialog.css({
|
||||
"width": "85vw",
|
||||
"max-width": "85vw",
|
||||
"max-width": "85vw",
|
||||
"margin-left": "-25vh"
|
||||
});
|
||||
|
||||
@ -34,16 +34,7 @@ function create_dialog_and_init_map(frm) {
|
||||
};
|
||||
|
||||
dialog.show();
|
||||
|
||||
// Ensure the map container expands to fit its parent after the dialog is shown
|
||||
setTimeout(() => {
|
||||
const mapElement = document.getElementById('map');
|
||||
if (mapElement) {
|
||||
mapElement.style.width = "100%";
|
||||
mapElement.style.height = "100%";
|
||||
init_map(frm); // Initialize the map
|
||||
}
|
||||
}, 500); // Add a delay to ensure the map loads correctly
|
||||
setTimeout(() => init_map(frm), 500);
|
||||
}
|
||||
|
||||
var currentMap = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user