Commit ff9412dd authored by marc duez's avatar marc duez

model.js : set localStorage after every file load

parent bd9eb0c8
......@@ -54,6 +54,7 @@ function Model() {
this.create_germline_obj();
this.view = [];
this.checkLocalStorage();
this.reset();
this.setAll();
this.checkBrowser();
this.germlineList = new GermlineList()
......@@ -175,7 +176,6 @@ Model.prototype = {
* Set all the properties. Called in the constructor.
*/
setAll: function () {
this.reset()
this.system_selected = []
this.top = 50
......
......@@ -107,6 +107,7 @@ Model_loader.prototype = {
oFReader.readAsText(oFile);
oFReader.onload = function (oFREvent) {
self.reset();
self.setAll()
self.parseJsonData(oFREvent.target.result, limit);
self.loadGermline()
.initClones()
......@@ -193,6 +194,7 @@ Model_loader.prototype = {
url: url,
success: function (result) {
self.reset();
self.setAll();
self.parseJsonData(result, 100)
.loadGermline()
.initClones()
......@@ -269,6 +271,7 @@ Model_loader.prototype = {
return 0;
}
self.reset();
self.setAll()
//copy .vidjil file in model
var store_config = this.config;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment