Fix map layout jump, CRM/edit distributeurs, progress overlay.

Stable map grid, no fitBounds on world view, entity PATCH edit form, CRM buttons on distributors, and loading animation for sync/wait states.
This commit is contained in:
Aissa
2026-07-19 18:47:12 +00:00
parent 6856d09cd1
commit 8d2766efb6
6 changed files with 263 additions and 14 deletions
+6 -3
View File
@@ -221,7 +221,8 @@ window.ExportIntelMap = (function () {
return map;
}
function setFeatures(geojson) {
function setFeatures(geojson, opts) {
opts = opts || {};
if (!map || !clusterLayer) return;
clusterLayer.clearLayers();
markersById = {};
@@ -247,10 +248,12 @@ window.ExportIntelMap = (function () {
invalidateMapSize();
if (features.length === 1) {
if (opts.autoFit === false) {
map.setView([20, 10], 2);
} else if (features.length === 1) {
var c = features[0].geometry.coordinates;
map.setView([c[1], c[0]], 10);
} else if (markers.length > 1 && clusterLayer.getBounds) {
} else if (opts.autoFit && markers.length > 1 && clusterLayer.getBounds) {
try {
map.fitBounds(clusterLayer.getBounds(), { padding: [40, 40], maxZoom: 12 });
} catch (e) { /* empty */ }