|
|
|
|
|
|
|
|
if (el.classList.contains("modal")){ |
|
|
if (el.classList.contains("modal")){ |
|
|
if (this.__currentModalEl !== null && force) |
|
|
if (this.__currentModalEl !== null && force) |
|
|
this.close_modal(); |
|
|
this.close_modal(); |
|
|
if this.__currentModalEl === null){ |
|
|
|
|
|
|
|
|
if (this.__currentModalEl === null){ |
|
|
el.classList.add("modal-visible"); |
|
|
el.classList.add("modal-visible"); |
|
|
this.__currentModalEl = el; |
|
|
this.__currentModalEl = el; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const instance = new Modal(); |
|
|
const instance = new Modal(); |
|
|
Object.freeze(instance); |
|
|
|
|
|
export default instance; |
|
|
export default instance; |