From ebdc20aba1e83e7ffbc1cb0a09e3231dbd5c294c Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Tue, 14 Jul 2015 16:39:57 +0400
Subject: [PATCH] eod

---
 js/lattice/Lattice.js       | 2 +-
 js/menus/MenuWrapperView.js | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/js/lattice/Lattice.js b/js/lattice/Lattice.js
index 958e984c..c8ecae1d 100644
--- a/js/lattice/Lattice.js
+++ b/js/lattice/Lattice.js
@@ -13,7 +13,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
             units: "mm",
 
             cellType: "cube",
-            connectionType: "face",
+            connectionType: "gik",
             partType: null,
 
             denseCellsMin: null,
diff --git a/js/menus/MenuWrapperView.js b/js/menus/MenuWrapperView.js
index fd158fc5..a28159fa 100644
--- a/js/menus/MenuWrapperView.js
+++ b/js/menus/MenuWrapperView.js
@@ -112,11 +112,12 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex
             var key = $target.data("key");
 
             //some numbers are relative
-            if (property == "stockPosition" && globals.cam.get(property + "Relative")){
-                if (key) newVal = parseFloat((newVal + globals.cam.get("originPosition")[key]).toFixed(4));
+            var owner = this._getPropertyOwner($target);//todo not great here
+            if (property == "stockPosition" && owner.get(property + "Relative")){
+                if (key) newVal = parseFloat((newVal + owner.get("originPosition")[key]).toFixed(4));
                 else console.warn("no key found for " + property);
-            } else if (property == "rapidHeight" && !globals.cam.get(property + "Relative")){
-                newVal = parseFloat((newVal - globals.cam.get("originPosition")["z"]).toFixed(4));
+            } else if (property == "rapidHeight" && !owner.get(property + "Relative")){
+                newVal = parseFloat((newVal - owner.get("originPosition")["z"]).toFixed(4));
             }
 
             //remove trailing zeros
-- 
GitLab