adventskalender/shared/js/position.js aktualisiert

This commit is contained in:
2025-11-04 10:53:41 +00:00
parent 6613a4302d
commit f3f294ab11

View File

@@ -22,7 +22,7 @@ function positionAllDoors() {
door.style.position = 'absolute';
door.style.width = w + 'px';
door.style.height = w + 'px';
door.style.top = (imgRect.height * (topPct / 100)) + 'px';
door.style.top = (imgRect.top - contRect.top + imgRect.height * (topPct / 100)) + 'px';
door.style.left = (imgRect.width * (leftPct / 100) + (contRect.width - imgRect.width) / 2) + 'px';
});
}