mirror of
				https://github.com/Maks1mS/free-ozon-dpr.git
				synced 2025-11-03 22:51:22 +03:00 
			
		
		
		
	fix: hide map while popup is opened
This commit is contained in:
		@@ -1,15 +1,18 @@
 | 
			
		||||
import Cookies from "js-cookie";
 | 
			
		||||
import { el } from "./utils.js";
 | 
			
		||||
 | 
			
		||||
const HIDE_INFO_POPUP = "hideInfoPopup";
 | 
			
		||||
 | 
			
		||||
document.addEventListener("DOMContentLoaded", function () {
 | 
			
		||||
  const infoPopup = document.querySelector(".info-popup");
 | 
			
		||||
  const noShowCheckbox = document.querySelector('input[name="no-show"]');
 | 
			
		||||
    const confirmButton = document.querySelector('.info-popup footer button');
 | 
			
		||||
  const confirmButton = document.querySelector(".info-popup footer button");
 | 
			
		||||
  const map = el("map");
 | 
			
		||||
 | 
			
		||||
  const hidePopupCookie = Cookies.get(HIDE_INFO_POPUP);
 | 
			
		||||
  if (!hidePopupCookie) {
 | 
			
		||||
    infoPopup.style.display = "block";
 | 
			
		||||
    map.style.display = "none";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  confirmButton.addEventListener("click", function () {
 | 
			
		||||
@@ -18,5 +21,6 @@ document.addEventListener("DOMContentLoaded", function () {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    infoPopup.style.display = "none";
 | 
			
		||||
    map.style.display = "block";
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
@@ -76,3 +76,5 @@ body {
 | 
			
		||||
  color: var(--ol-brand-color);
 | 
			
		||||
  text-decoration: underline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.info-popup-content > p { text-align:justify; }
 | 
			
		||||
		Reference in New Issue
	
	Block a user