ressources, corrections fonds, placement icones map projets fonctionnel en mobile
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user