diff --git a/js/main.js b/js/main.js index a7ea11aef4a6377a720358e1822108dea8c16e5f..313871f1d5a5b9c29d89e9ecb379e7f058088ca6 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 d1a466d7ea9eabc8c848a698a1ce5e2f5e0975bc..af3ed3ba11097948bc47e986fe414fedce9284e5 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 ba87d984f9cbc6f4e36140395d5fdb40ad64dd28..7d1be5af20261c7b26493ef8496f0c703eff8a74 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(); }