From d044d0a28a6b0e8df898a57aeff3b5ff81b22677 Mon Sep 17 00:00:00 2001 From: Luiz Costa Date: Fri, 7 Jun 2024 12:28:04 +0100 Subject: [PATCH] try fix show map --- fleet_management/fleet_management/doctype/trip/trip_list.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fleet_management/fleet_management/doctype/trip/trip_list.js b/fleet_management/fleet_management/doctype/trip/trip_list.js index 806846d..70f9f12 100644 --- a/fleet_management/fleet_management/doctype/trip/trip_list.js +++ b/fleet_management/fleet_management/doctype/trip/trip_list.js @@ -21,8 +21,8 @@ function create_dialog_and_init_map(frm) { // Adjust the size of the dialog dynamically to 80% of the browser window const modalContent = dialog.$wrapper.find('.modal-content'); - modalContent.css("width", "80%"); - modalContent.css("height", "80%"); + modalContent.css("width", "80vw"); + modalContent.css("height", "80vh"); modalContent.css("max-width", "none"); // Ensure no max-width restrictions // Add hide event to reload the page when the dialog is closed @@ -93,7 +93,7 @@ function init_map(frm) { }, callback: function (r) { if (r.message) { - console.table(r.message); + //console.table(r.message); const data = r.message; const routeCoordinates = data.map(entry => [entry.latitude, entry.longitude]); const polyline = window.L.polyline(routeCoordinates, { color: 'red' }).addTo(map);