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

small changes

parent 5c8c2617
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
this.set("color", makeRandomColor());
},
makeNewCompositeMaterial: function(name){
makeNewCompositeMaterial: function(name, dimensions){
if (this.get("numCells") == 0) {
console.warn("no cells in this composite");
return;
......@@ -72,7 +72,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
sparseCells: JSON.parse(JSON.stringify(this.sparseCells)),
cellsMin: this.get("cellsMin").clone(),
cellsMax: this.get("cellsMax").clone(),
dimensions: this.calculateBoundingBox()
dimensions: dimensions
};
globals.materials.compositeMaterials[id] = data;//todo trigger change on all instances
},
......
......@@ -49,7 +49,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals'], fu
this._exit();
return;
}
lattice.compositeEditor.makeNewCompositeMaterial($("#compositeName").val());
lattice.compositeEditor.makeNewCompositeMaterial($("#compositeName").val(), dimensions.clone());
this._exit();
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment