From 7270ce5c792074742949c139bc6654ba7c43b954 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Mon, 21 Sep 2015 19:56:18 -0400
Subject: [PATCH] eod

---
 js/main.js             | 2 ++
 js/models/AppState.js  | 2 ++
 js/three/ThreeModel.js | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/js/main.js b/js/main.js
index a7ea11ae..313871f1 100644
--- a/js/main.js
+++ b/js/main.js
@@ -286,5 +286,7 @@ require(['appState', 'lattice', 'navbar', 'threeModel', 'threeView', 'globals',
     var threeView = new ThreeView({model:three});
     globals.threeView = threeView;//todo fix this
 
+//    three.startAnimationLoop();
+
 //    if (lattice.get("connectionType") != "gik") lattice.getUItarget().addCellAtIndex({x:0,y:0,z:0});//add a cell
 });
diff --git a/js/models/AppState.js b/js/models/AppState.js
index d1a466d7..af3ed3ba 100644
--- a/js/models/AppState.js
+++ b/js/models/AppState.js
@@ -123,6 +123,8 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'], fu
                 this.set("basePlaneIsVisible", false);
                 this.set("highlighterIsVisible", false);
             }
+
+            if (this.get("cellMode") == "hide") this.set("cellMode", "cell");
         },
 
         _materialTypeChanged: function(){
diff --git a/js/three/ThreeModel.js b/js/three/ThreeModel.js
index ba87d984..7d1be5af 100644
--- a/js/three/ThreeModel.js
+++ b/js/three/ThreeModel.js
@@ -170,7 +170,7 @@ define(['underscore', 'three'], function(_, THREE){
     }
 
     function render(){
-        if ((appState && appState.get("turnOffRendering")) || animationLoopRunning) return;
+        if (animationLoopRunning || (appState && appState.get("turnOffRendering"))) return;
         _render();
     }
 
-- 
GitLab