mirror of
https://github.com/itsdave-de/fusionpbx_connect.git
synced 2025-05-07 08:05:30 +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');
|
const modalDialog = dialog.$wrapper.find('.modal-content');
|
||||||
modalDialog.css({
|
modalDialog.css({
|
||||||
"width": "85vw",
|
"width": "85vw",
|
||||||
"max-width": "85vw",
|
"max-width": "85vw",
|
||||||
"margin-left": "-25vh"
|
"margin-left": "-25vh"
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -34,16 +34,7 @@ function create_dialog_and_init_map(frm) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
setTimeout(() => init_map(frm), 500);
|
||||||
// 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentMap = null;
|
var currentMap = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user