Browse Source

Moved CTRLPalettesStore and CTRLBanksStore initialization from main to CTRLIO

dev
Bryan Miller 5 years ago
parent
commit
d9ecac6506
3 changed files with 6 additions and 7 deletions
  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 View File

@@ -191,7 +191,7 @@ class CTRLBanksStore{
Banks[name].el.click();
}
return this;
}
}

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

+ 5
- 1
app/js/ctrls/CTRLIO.js View File

@@ -2,14 +2,16 @@ import GlobalEvents from "/app/js/common/EventCaller.js";
import Utils from "/app/js/common/Utils.js";
import NESBank from "/app/js/models/NESBank.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;

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


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

@@ -6,8 +6,6 @@ import Modal from "/app/js/ui/Modal.js";
import Tabs from "/app/js/ui/Tabs.js";
import CTRLPalettes from "/app/js/ctrls/CTRLPalettes.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 CTRLIO from "/app/js/ctrls/CTRLIO.js";

@@ -36,9 +34,6 @@ function initialize(DOC){
CTRLPainter.initialize();
CTRLBankTools.initialize();

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

CTRLIO.initialize();

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

Loading…
Cancel
Save