rename methods

master
David Zálešák 4 years ago
parent d9ffda3088
commit c48313f298

@ -16,7 +16,7 @@
<div class="container">
<nav>
<button class="clone">Clone</button>
<button class="purge">Purge</button>
<button class="wipe">Wipe FS</button>
</nav>
<aside>
<ul>

@ -6,13 +6,13 @@ class Controller {
this.redrawDirTree(view);
var cloneBtn = document.getElementsByClassName("clone")[0];
var purgeBtn = document.getElementsByClassName("purge")[0];
var purgeBtn = document.getElementsByClassName("wipe")[0];
cloneBtn.addEventListener("click", this.cloneRep.bind(this));
purgeBtn.addEventListener("click", this.purgeFS.bind(this));
purgeBtn.addEventListener("click", this.wipeFS.bind(this));
}
purgeFS() {
this.model.purgeFS();
wipeFS() {
this.model.wipeFS();
//window.location.reload();
this.redrawDirTree(this.view);
}

@ -41,7 +41,7 @@ class Model {
return tree;
}
purgeFS() {
wipeFS() {
delete window.fs;
window.fs = new LightningFS("fs", { wipe: true });
}