Browse Source

Modal functions.

dev-tmpl
Bryan Miller 6 years ago
parent
commit
6f1599e29f
2 changed files with 2 additions and 2 deletions
  1. +1
    -0
      app/js/main.js
  2. +1
    -2
      app/js/ui/Modal.js

+ 1
- 0
app/js/main.js View File

import EventWindow from "/app/js/ui/EventWindow.js"; import EventWindow from "/app/js/ui/EventWindow.js";
import Modal from "/app/js/ui/Modal.js";
import {NESPainter} from "/app/js/NESPainter.js"; import {NESPainter} from "/app/js/NESPainter.js";
import {NESPalette} from "/app/js/NESPalette.js"; import {NESPalette} from "/app/js/NESPalette.js";



+ 1
- 2
app/js/ui/Modal.js View File

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;

Loading…
Cancel
Save