diff --git a/web/modules/custom/q2d_mod/assets/css/carte-interactive-qdd.css b/web/modules/custom/q2d_mod/assets/css/carte-interactive-qdd.css index d3ef35d..de22b1e 100644 --- a/web/modules/custom/q2d_mod/assets/css/carte-interactive-qdd.css +++ b/web/modules/custom/q2d_mod/assets/css/carte-interactive-qdd.css @@ -5,6 +5,7 @@ #sites-map-container { background-color: #cecfcc; text-align: center; + position: relative; } /* #sites-map-container .circle { fill: black; @@ -25,7 +26,7 @@ #sites-map-container #popup { font-family: 'gilroy-semibold'; display: none; - position: fixed; + position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); @@ -56,3 +57,7 @@ padding-left: 0.2rem; } + +#popup-content{ + width: 300px; +} diff --git a/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js b/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js index ed209ff..b174d91 100644 --- a/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js +++ b/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js @@ -12,8 +12,8 @@ function showPopup(content, x, y) { const rect = svgElement.getBoundingClientRect(); // Calcul de la position du popup - let popupX = rect.left + x + 120; - let popupY = rect.top + y + 20; + let popupX = rect.left + x + 100; + let popupY = rect.top + y + -300; // Dimensions de la fenĂȘtre et du popup const viewportWidth = window.innerWidth;