Commit c7e6327a authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

force process everytime until I figure out what's wrong with lattice event binding

parent 0c709aeb
...@@ -167,7 +167,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel ...@@ -167,7 +167,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
var currentTab = appState.get("currentTab"); var currentTab = appState.get("currentTab");
if (currentTab == "assemblerSetup") this.get("assembler").buildComponentTree(); if (currentTab == "assemblerSetup") this.get("assembler").buildComponentTree();
if (currentTab != "animate") this.resetSimulation(); if (currentTab != "animate") this.resetSimulation();
else if (this.get("needsPostProcessing")) this.postProcess(); else this.postProcess();//if (this.get("needsPostProcessing"))
}, },
_setCAMVisibility: function(){ _setCAMVisibility: function(){
...@@ -322,7 +322,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel ...@@ -322,7 +322,7 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
this.set("needsPostProcessing", true); this.set("needsPostProcessing", true);
}, },
postProcess: function(){ postProcess: function(callback){
console.log("process"); console.log("process");
this.set("needsPostProcessing", false); this.set("needsPostProcessing", false);
...@@ -343,8 +343,8 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel ...@@ -343,8 +343,8 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
self.set("editsMadeToProgram", false); self.set("editsMadeToProgram", false);
self.set("exporter", exporter); self.set("exporter", exporter);
if (!appState.get("stockSimulationPlaying")) self.resetSimulation(); if (!appState.get("stockSimulationPlaying")) self.resetSimulation();
if (callback) callback(exporter, self.get("dataOut"));
}); });
// return {data:data, exporter:exporter};//todo this breaks save
}, },
_getExporter: function(callback){ _getExporter: function(callback){
...@@ -362,12 +362,11 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel ...@@ -362,12 +362,11 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
}, },
save: function(){ save: function(){
if (this.get("needsPostProcessing")){ // if (this.get("needsPostProcessing")){
var output = this.postProcess(); this.postProcess(function(exporter, data){
output.exporter.save(output.data); exporter.save(data);
return; });
} // }
this.get("exporter").save(this.get("dataOut"));
} }
}); });
......
Supports Markdown
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