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

small changes

parent 5a85bbca
No related branches found
No related tags found
No related merge requests found
...@@ -82,8 +82,8 @@ define(['lattice', 'plist', 'console'], function(lattice, plist, myConsole){ ...@@ -82,8 +82,8 @@ define(['lattice', 'plist', 'console'], function(lattice, plist, myConsole){
lattice.setPartType(partType, false); lattice.setPartType(partType, false);
}, },
set: function(data){ setMetaData: function(data){
lattice.setLatticeMetaData(data); lattice.setMetaData(data);
}, },
......
...@@ -159,9 +159,9 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis ...@@ -159,9 +159,9 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis
return this.setProperty("partType", partType, silent); return this.setProperty("partType", partType, silent);
}, },
setLatticeMetaData: function(data){ setMetaData: function(data){
if (!data) { if (!data) {
console.warn("no data received"); myConsole.warn("no data received, lattice.setMetaData operation cancelled");
return; return;
} }
var changed = false; var changed = false;
...@@ -170,7 +170,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis ...@@ -170,7 +170,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis
if (self[self._getSetterName(key)]) { if (self[self._getSetterName(key)]) {
changed |= self[self._getSetterName(key)](val, true); changed |= self[self._getSetterName(key)](val, true);
} }
else console.warn("no setter found for param " + key); else myConsole.warn("no setter found for key " + key);
}); });
if (changed){ if (changed){
//todo trigger event //todo trigger event
...@@ -234,7 +234,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis ...@@ -234,7 +234,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis
_setDefaultCellMode: function(){//if no part associated with this lattice type set to cell mode _setDefaultCellMode: function(){//if no part associated with this lattice type set to cell mode
var latticeData = this._getLatticePlistData(); var latticeData = this._getLatticePlistData();
if (latticeData.parts === undefined){ if (!latticeData.parts){
var currentMode = appState.get("cellMode"); var currentMode = appState.get("cellMode");
if (currentMode == "cell" || currentMode == "supercell") return; if (currentMode == "cell" || currentMode == "supercell") return;
appState.set("cellMode", "cell"); appState.set("cellMode", "cell");
...@@ -249,10 +249,6 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis ...@@ -249,10 +249,6 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'materialsPlis
//latticeType //latticeType
_latticeTypeChanged: function(){
},
_printCurrentLatticeType: function(){ _printCurrentLatticeType: function(){
myConsole.write("lattice.setCellType('" + this.getCellType() + "')"); myConsole.write("lattice.setCellType('" + this.getCellType() + "')");
myConsole.write("lattice.setConnectionType('" + this.getConnectionType() + "')"); myConsole.write("lattice.setConnectionType('" + this.getConnectionType() + "')");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment