display position popup
This commit is contained in:
parent
806988276f
commit
9668e6368a
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue