debug interactive map on stage
This commit is contained in:
parent
ccd0f3a610
commit
5c4f8fd464
|
@ -172,8 +172,7 @@ for (let icon of projectsIcons) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function placeProjectsIcons(projectsIcons) {
|
function placeProjectsIcons(projectsIcons, container) {
|
||||||
const container = document.querySelector('#map_base');
|
|
||||||
const containerWidth = container.getBoundingClientRect().width;
|
const containerWidth = container.getBoundingClientRect().width;
|
||||||
const containerHeight = container.getBoundingClientRect().height;
|
const containerHeight = container.getBoundingClientRect().height;
|
||||||
|
|
||||||
|
@ -261,10 +260,16 @@ function hidePopup(){
|
||||||
|
|
||||||
// debugMapPlacement();
|
// debugMapPlacement();
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
placeProjectsIcons(projectsIcons);
|
let containerImg = document.querySelector('#map_base');
|
||||||
window.addEventListener('resize', () => {
|
containerImg.addEventListener('load', () => {
|
||||||
placeProjectsIcons(projectsIcons)
|
placeProjectsIcons(projectsIcons, containerImg);
|
||||||
});
|
window.addEventListener('resize', () => {
|
||||||
|
placeProjectsIcons(projectsIcons, containerImg);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
if (containerImg.complete) {
|
||||||
|
placeProjectsIcons(projectsIcons, containerImg);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function debugMapPlacement() {
|
function debugMapPlacement() {
|
||||||
|
|
Loading…
Reference in New Issue