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

clear all cells on import menu

parent 0c4678d6
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,8 @@ ImportMenuView = Backbone.View.extend({ ...@@ -14,7 +14,8 @@ ImportMenuView = Backbone.View.extend({
"click #removeFillGeo": "_removeMesh", "click #removeFillGeo": "_removeMesh",
"click #selectWall": "_buildWall", "click #selectWall": "_buildWall",
"click #doSubtractGeo": "_subtractGeo", "click #doSubtractGeo": "_subtractGeo",
"click #doFillGeo": "_fillGeo" "click #doFillGeo": "_fillGeo",
"click .btn-clearCells": "_clearCells"
}, },
initialize: function(){ initialize: function(){
...@@ -81,6 +82,11 @@ ImportMenuView = Backbone.View.extend({ ...@@ -81,6 +82,11 @@ ImportMenuView = Backbone.View.extend({
this.fillGeometry.removeMesh(); this.fillGeometry.removeMesh();
}, },
_clearCells: function(e){
e.preventDefault();
dmaGlobals.lattice.clearCells();
},
render: function(){ render: function(){
if (this.model.get("currentTab") != "import") return; if (this.model.get("currentTab") != "import") return;
this.$el.html(this.template(_.extend(this.model.toJSON(), this.fillGeometry.toJSON()))); this.$el.html(this.template(_.extend(this.model.toJSON(), this.fillGeometry.toJSON())));
...@@ -126,6 +132,7 @@ ImportMenuView = Backbone.View.extend({ ...@@ -126,6 +132,7 @@ ImportMenuView = Backbone.View.extend({
<a href="#" id="removeFillGeo" class=" btn btn-block btn-lg btn-default">Remove Mesh</a><br/>\ <a href="#" id="removeFillGeo" class=" btn btn-block btn-lg btn-default">Remove Mesh</a><br/>\
<hr>\ <hr>\
<% } %>\ <% } %>\
<a href="#" class=" btn btn-block btn-lg btn-default btn-clearCells">Clear All Cells</a><br/><br/>\
<br/><span class="btn btn-default btn-lg btn-file fullWidth">\ <br/><span class="btn btn-default btn-lg btn-file fullWidth">\
Upload STL<input id="uploadMesh" type="file">\ Upload STL<input id="uploadMesh" type="file">\
</span><br/>\ </span><br/>\
......
...@@ -65,4 +65,4 @@ Ribbon = Backbone.View.extend({ ...@@ -65,4 +65,4 @@ Ribbon = Backbone.View.extend({
}); });
// <a class="btn btn-primary btn-ribbon cellsVisible<% if (!cellsVisible){ %> ribbon-selected<% } %>" href="#"><img data-type="part" src="assets/imgs/hide.png"></a>\ //<a class="btn btn-primary btn-ribbon cellsVisible<% if (!cellsVisible){ %> ribbon-selected<% } %>" href="#"><img data-type="part" src="assets/imgs/hide.png"></a>\
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