From 97df66665fe5137f1c63eccfd2a4770f0a0c4cce Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Thu, 29 Jan 2015 01:55:55 -0500
Subject: [PATCH] parts removed when needed

---
 js/fea/dmaCell.js           | 3 +++
 js/fea/dmaPart.js           | 4 ++++
 js/menus/LatticeMenuView.js | 2 +-
 main.html                   | 8 +++-----
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/js/fea/dmaCell.js b/js/fea/dmaCell.js
index a6e10109..e861ab75 100644
--- a/js/fea/dmaCell.js
+++ b/js/fea/dmaCell.js
@@ -147,6 +147,9 @@
 
     DMACell.prototype.remove = function(){
         if (this.cellMesh) window.three.sceneRemove(this.cellMesh);
+        _.each(this.parts, function(part){
+            part.remove();
+        });
     };
 
     DMACell.prototype._destroy = function(){
diff --git a/js/fea/dmaPart.js b/js/fea/dmaPart.js
index e0424c11..f6f35c8e 100644
--- a/js/fea/dmaPart.js
+++ b/js/fea/dmaPart.js
@@ -91,6 +91,10 @@
         if (this.mesh) this.mesh.visible = false;
     };
 
+    DMAPart.prototype.remove = function(){
+        if (this.mesh) window.three.sceneRemove(this.mesh);
+    };
+
     DMAPart.prototype._destroy = function(){
         this.parentCell = null;
     };
diff --git a/js/menus/LatticeMenuView.js b/js/menus/LatticeMenuView.js
index 428c865d..d747d374 100644
--- a/js/menus/LatticeMenuView.js
+++ b/js/menus/LatticeMenuView.js
@@ -38,7 +38,7 @@ LatticeMenuView = Backbone.View.extend({
     },
 
     _formatData: function(){
-        var formattedCellType = "Octagon";
+        var formattedCellType = "Octahedral";
         var formattedConnectionType = "Face-Connected";
         return {formattedCellType:formattedCellType, formattedConnectionType:formattedConnectionType};
     },
diff --git a/main.html b/main.html
index 7e3cfa55..d5d225bc 100644
--- a/main.html
+++ b/main.html
@@ -75,9 +75,6 @@
 
 <nav class="navbar navbar-inverse navbar-embossed" role="navigation">
     <div class="navbar-header">
-      <!--<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-01">-->
-        <!--<span class="sr-only">Toggle navigation</span>-->
-      <!--</button>-->
       <a id="mainNavLink" class="navbar-brand" href="http://cba.mit.edu"><img id="logo" src="assets/logo.png"></a>
     </div>
     <div class="collapse navbar-collapse" id="navbar-collapse-01">
@@ -96,11 +93,12 @@
         </li>
         <li><a data-menu-id="about" class="menuHoverControls" href="#">About</a></li>
        </ul>
-        <ul class="nav navbar-nav navbar-right">
+        <ul class="nav navbar-nav pull-right">
             <li><a id="showHideMenu" data-state=true class="menuHoverControls" href="#">Hide Menu >></a></li>
         </ul>
-       <!--<a href="#fakelink" id="clearAll" class=" btn btn-lg btn-primary">Clear All</a>-->
+
     </div><!-- /.navbar-collapse -->
+
 </nav>
 
 <div id="menuWrapper">
-- 
GitLab