Skip to content
Snippets Groups Projects
Commit 8d520f55 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

cell mode fallback

parent 50d00a14
Branches
No related tags found
No related merge requests found
......@@ -386,6 +386,9 @@ Lattice = Backbone.Model.extend({
////////////////////////////////////////////////////////////////////////////////////
_updateLatticeType: function(arg1, arg2, arg3, loadingFromFile){//do not clear cells if loading from file (cells array contains important metadata)
this._setDefaultCellMode();
if (typeof loadingFromFile == "undefined") loadingFromFile = false;
var cellType = this.get("cellType");
var connectionType = this.get("connectionType");
......@@ -451,6 +454,12 @@ Lattice = Backbone.Model.extend({
dmaGlobals.three.render();
},
_setDefaultCellMode: function(){
if (!dmaGlobals.appState.get("allPartTypes")[this.get("cellType")][this.get("connectionType")]){
dmaGlobals.appState.set("cellMode", "cell");
}
},
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////UTILS///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment