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