Przeglądaj źródła

Moved CTRLPalettesStore and CTRLBanksStore initialization from main to CTRLIO

dev
Bryan Miller 5 lat temu
rodzic
commit
d9ecac6506
3 zmienionych plików z 6 dodań i 7 usunięć
  1. +1
    -1
      app/js/ctrls/CTRLBanksStore.js
  2. +5
    -1
      app/js/ctrls/CTRLIO.js
  3. +0
    -5
      app/js/main.js

+ 1
- 1
app/js/ctrls/CTRLBanksStore.js Wyświetl plik

Banks[name].el.click(); Banks[name].el.click();
} }
return this; return this;
}
}


clear(){ clear(){
Object.keys(Banks).forEach((item) => { Object.keys(Banks).forEach((item) => {

+ 5
- 1
app/js/ctrls/CTRLIO.js Wyświetl plik

import Utils from "/app/js/common/Utils.js"; import Utils from "/app/js/common/Utils.js";
import NESBank from "/app/js/models/NESBank.js"; import NESBank from "/app/js/models/NESBank.js";
import NESPalette from "/app/js/models/NESPalette.js"; import NESPalette from "/app/js/models/NESPalette.js";
import CTRLPalettesStore from "/app/js/ctrls/CTRLPalettesStore.js";
import CTRLBanksStore from "/app/js/ctrls/CTRLBanksStore.js";




var SURF = null; var SURF = null;


function LoadFile(file){ function LoadFile(file){
if (SURF !== null){ if (SURF !== null){
var reader = new FileReader();
if (SURF instanceof NESBank){ if (SURF instanceof NESBank){
var reader = new FileReader();
reader.onload = function(e){ reader.onload = function(e){
try { try {
SURF.chr = new Uint8Array(e.target.result); SURF.chr = new Uint8Array(e.target.result);
e[i].addEventListener("dragover", HANDLE_DragOver); e[i].addEventListener("dragover", HANDLE_DragOver);
e[i].addEventListener("drop", HANDLE_FileDrop); e[i].addEventListener("drop", HANDLE_FileDrop);
} }
CTRLPalettesStore.initialize();
CTRLBanksStore.initialize();
} }
} }



+ 0
- 5
app/js/main.js Wyświetl plik

import Tabs from "/app/js/ui/Tabs.js"; import Tabs from "/app/js/ui/Tabs.js";
import CTRLPalettes from "/app/js/ctrls/CTRLPalettes.js"; import CTRLPalettes from "/app/js/ctrls/CTRLPalettes.js";
import CTRLPainter from "/app/js/ctrls/CTRLPainter.js"; import CTRLPainter from "/app/js/ctrls/CTRLPainter.js";
import CTRLPalettesStore from "/app/js/ctrls/CTRLPalettesStore.js";
import CTRLBanksStore from "/app/js/ctrls/CTRLBanksStore.js";
import CTRLBankTools from "/app/js/ctrls/CTRLBankTools.js"; import CTRLBankTools from "/app/js/ctrls/CTRLBankTools.js";
import CTRLIO from "/app/js/ctrls/CTRLIO.js"; import CTRLIO from "/app/js/ctrls/CTRLIO.js";


CTRLPainter.initialize(); CTRLPainter.initialize();
CTRLBankTools.initialize(); CTRLBankTools.initialize();


CTRLPalettesStore.initialize();
CTRLBanksStore.initialize();

CTRLIO.initialize(); CTRLIO.initialize();


var cover = document.querySelector(".cover"); var cover = document.querySelector(".cover");

Ładowanie…
Anuluj
Zapisz