display position popup
This commit is contained in:
parent
806988276f
commit
9668e6368a
|
@ -5,6 +5,7 @@
|
||||||
#sites-map-container {
|
#sites-map-container {
|
||||||
background-color: #cecfcc;
|
background-color: #cecfcc;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
/* #sites-map-container .circle {
|
/* #sites-map-container .circle {
|
||||||
fill: black;
|
fill: black;
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
#sites-map-container #popup {
|
#sites-map-container #popup {
|
||||||
font-family: 'gilroy-semibold';
|
font-family: 'gilroy-semibold';
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
|
@ -56,3 +57,7 @@
|
||||||
padding-left: 0.2rem;
|
padding-left: 0.2rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#popup-content{
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ function showPopup(content, x, y) {
|
||||||
const rect = svgElement.getBoundingClientRect();
|
const rect = svgElement.getBoundingClientRect();
|
||||||
|
|
||||||
// Calcul de la position du popup
|
// Calcul de la position du popup
|
||||||
let popupX = rect.left + x + 120;
|
let popupX = rect.left + x + 100;
|
||||||
let popupY = rect.top + y + 20;
|
let popupY = rect.top + y + -300;
|
||||||
|
|
||||||
// Dimensions de la fenêtre et du popup
|
// Dimensions de la fenêtre et du popup
|
||||||
const viewportWidth = window.innerWidth;
|
const viewportWidth = window.innerWidth;
|
||||||
|
|
Loading…
Reference in New Issue