|
|
|
@ -37,13 +37,20 @@ export class Header extends HTMLElement { |
|
|
|
this.menuPanel.appendChild(this.menu) |
|
|
|
this.shadowRoot.appendChild(this.menuPanel) |
|
|
|
this.overlay.addEventListener('click', () => { |
|
|
|
this.overlay.classList.add('closing') |
|
|
|
this.overlay.classList.remove('open') |
|
|
|
this.menuPanel.classList.remove('open') |
|
|
|
setTimeout(() => { |
|
|
|
this.overlay.classList.remove('closing') |
|
|
|
}, 250) |
|
|
|
this.close() |
|
|
|
}) |
|
|
|
this.menu.addEventListener('close', () => { |
|
|
|
this.close() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
close() { |
|
|
|
this.overlay.classList.add('closing') |
|
|
|
this.overlay.classList.remove('open') |
|
|
|
this.menuPanel.classList.remove('open') |
|
|
|
setTimeout(() => { |
|
|
|
this.overlay.classList.remove('closing') |
|
|
|
}, 250) |
|
|
|
} |
|
|
|
|
|
|
|
connectedCallback() { |
|
|
|
|