From fb2bdbf3836e8ad8cfe3bcd7f4ef0ca28c2d6351 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Fri, 15 May 2015 22:12:14 -0400
Subject: [PATCH] z spacing

---
 js/menus/LatticeMenuView.js  |  2 +-
 js/models/AppState.js        | 23 +++++++++++++++++++++++
 js/models/LatticeOther.js    |  2 +-
 js/threeViews/Highlighter.js |  1 +
 4 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/js/menus/LatticeMenuView.js b/js/menus/LatticeMenuView.js
index 3b5ba2eb..a5f14cff 100644
--- a/js/menus/LatticeMenuView.js
+++ b/js/menus/LatticeMenuView.js
@@ -171,7 +171,7 @@ LatticeMenuView = Backbone.View.extend({
         <% } %>\
         <% if (connectionType == "gik") { %>\
         GIK Length:&nbsp;&nbsp;<input id="gikLength" value="<%= gikLength %>" placeholder="GIK length" class="form-control numberInput" type="text"><br/>\
-        <% } %>\
+        <br/><% } %>\
         <br/>\
         Scale:&nbsp;&nbsp;<input id="latticeScale" value="<%= scale %>" placeholder="enter scale" class="form-control numberInput" type="text"><br/>\
         <input id="scaleSlider" data-slider-id="ex1Slider" type="text" data-slider-min="1" data-slider-max="100" data-slider-step="0.1" data-slider-value="<%= scale %>"/>\
diff --git a/js/models/AppState.js b/js/models/AppState.js
index f247f533..d65a1954 100644
--- a/js/models/AppState.js
+++ b/js/models/AppState.js
@@ -90,6 +90,29 @@ AppState = Backbone.Model.extend({
             kelvin: {face: null}
         },
 
+        allMaterialTypes:{
+            octa:{
+                face: null,
+                freeformFace: null,
+                edge: null,
+                edgeRot: null,
+                vertex: null//{
+                    //beam:"Beam",
+//                    square:"Square",
+//                    xShape:"X"
+//                }
+            },
+            tetra: {vertex: null},
+            cube: {face: null,
+                gik: {
+                    brass:"Brass",
+                    fiberGlass: "Fiberglass"
+                }
+            },
+            truncatedCube: {face: null},
+            kelvin: {face: null}
+        },
+
         allMachineTypes:{
             octa:{
                 face: {handOfGod: "Hand of God"},
diff --git a/js/models/LatticeOther.js b/js/models/LatticeOther.js
index 0cbc382d..5cf4ff23 100644
--- a/js/models/LatticeOther.js
+++ b/js/models/LatticeOther.js
@@ -80,7 +80,7 @@ OtherLatticeSubclasses = {
 
         zScale: function(scale){
             if (!scale) scale = this.get("scale");
-            return scale*(1+2*this.get("cellSeparation").z);
+            return 1.28*scale*(1+2*this.get("cellSeparation").z);
         },
 
         makeCellForLatticeType: function(indices, scale){
diff --git a/js/threeViews/Highlighter.js b/js/threeViews/Highlighter.js
index bb8fa30b..7be8ae3f 100644
--- a/js/threeViews/Highlighter.js
+++ b/js/threeViews/Highlighter.js
@@ -236,6 +236,7 @@ GIKHighlighter = Highlighter.extend({
 
     updateGikLength: function(scale){
         this.updateScale(scale);
+        if (!this.direction) return;
         this._setPosition(this.position, this.direction);//position of center point
         this._setRotation(this.direction, this.index);
         dmaGlobals.three.render();
-- 
GitLab