@@ -191,7 +191,7 @@ class CTRLBanksStore{ | |||
Banks[name].el.click(); | |||
} | |||
return this; | |||
} | |||
} | |||
clear(){ | |||
Object.keys(Banks).forEach((item) => { |
@@ -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(); | |||
} | |||
} | |||
@@ -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"); |