diff --git a/js/menus/LatticeMenuView.js b/js/menus/LatticeMenuView.js index d3ca8e8afa682d693cec32056956067b5b9b901e..4a946653f2618da310b3b03549b9c08d12e48000 100644 --- a/js/menus/LatticeMenuView.js +++ b/js/menus/LatticeMenuView.js @@ -78,7 +78,7 @@ LatticeMenuView = Backbone.View.extend({ <li><a class="connectionType" data-type="<%= key %>" href="#"><%= allConnectionTypes[cellType][key] %></a></li>\ <% }); %>\ </ul>\ - </div><br/>\ + </div><br/><br/>\ Scale: <input id="latticeScale" value="<%= scale %>" placeholder="enter scale" class="form-control" type="text"><br/>\ NumCells: <%= numCells %><br/>\ <br/>\ diff --git a/js/models/Lattice.js b/js/models/Lattice.js index bd3d56832aab34d67f7c2b4dd9f355b8abbe5ada..0032b21d62d7bb75527357c5079fded4e7ea639d 100644 --- a/js/models/Lattice.js +++ b/js/models/Lattice.js @@ -97,10 +97,10 @@ Lattice = Backbone.Model.extend({ this._iterCells(this.get("cells"), function(cell){ if (cell) cell.destroy(); }); - this.set("cells", this.defaults.cells); - this.set("cellsMax", this.defaults.cellsMax); - this.set("cellsMin", this.defaults.cellsMin); - this.set("nodes", this.defaults.nodes); + this.set("cells", [[[null]]]); + this.set("cellsMax", {x:0, y:0, z:0}); + this.set("cellsMin", {x:0, y:0, z:0}); + this.set("nodes", []); this.set("numCells", 0); this.get("basePlane").set("zIndex", 0); window.three.render();