From 5c44fc1286d3c9c2a4f2f224accf492e7e8a3a11 Mon Sep 17 00:00:00 2001 From: igr-ok <80827974+igr-ok@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:40:26 +0100 Subject: [PATCH 1/2] Update map_renderer.js Fix problem with map render. Interval changed. --- web_view_leaflet_map/static/src/js/view/map/map_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_view_leaflet_map/static/src/js/view/map/map_renderer.js b/web_view_leaflet_map/static/src/js/view/map/map_renderer.js index 993338794f..b0892a3b8e 100644 --- a/web_view_leaflet_map/static/src/js/view/map/map_renderer.js +++ b/web_view_leaflet_map/static/src/js/view/map/map_renderer.js @@ -61,7 +61,7 @@ odoo.define("web_view_leaflet_map.MapRenderer", function (require) { return this._super.apply(this, arguments).then(function () { window.setTimeout(function () { self.leaflet_map.invalidateSize(); - }, 1); + }, 500); }); }, From 376210ce1cc99f6ee64540231e67fd74e9258a3b Mon Sep 17 00:00:00 2001 From: igr-ok <80827974+igr-ok@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:03:50 +0100 Subject: [PATCH 2/2] Update map_renderer.js (#2) 100ms is better! --- web_view_leaflet_map/static/src/js/view/map/map_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_view_leaflet_map/static/src/js/view/map/map_renderer.js b/web_view_leaflet_map/static/src/js/view/map/map_renderer.js index b0892a3b8e..ecb8aa4592 100644 --- a/web_view_leaflet_map/static/src/js/view/map/map_renderer.js +++ b/web_view_leaflet_map/static/src/js/view/map/map_renderer.js @@ -61,7 +61,7 @@ odoo.define("web_view_leaflet_map.MapRenderer", function (require) { return this._super.apply(this, arguments).then(function () { window.setTimeout(function () { self.leaflet_map.invalidateSize(); - }, 500); + }, 100); }); },