ressources, corrections fonds, placement icones map projets fonctionnel en mobile

This commit is contained in:
Valentin
2024-11-07 23:49:56 +01:00
parent 6db99742c4
commit 217b84c755
29 changed files with 1131 additions and 91 deletions

View File

@@ -198,7 +198,10 @@ function placeProjectsIcons(projectsIcons, container) {
const finalX = containerWidth * (territoryBounds.left / 100 + (xPercentage / 100) * (territoryBounds.right - territoryBounds.left) / 100) - iconWidth / 2;
const finalY = containerHeight * (territoryBounds.top / 100 + (yPercentage / 100) * (territoryBounds.bottom - territoryBounds.top) / 100) - iconWidth / 2;
icon.setAttribute('transform', `translate(${finalX}, ${finalY})`);
// icon.setAttribute('transform', `translate(${finalX}, ${finalY})`); // does not seems to be working on mobile
icon.style.left = `${finalX}px`;
icon.style.top = `${finalY}px`;
} else {
console.warn(`Territory not found for lat: ${lat}, lon: ${lon}`);
}