diff --git a/js/lattice/Lattice.js b/js/lattice/Lattice.js index 958e984cc4d5b1d6b3908bdc10409e1af497c0df..c8ecae1de80c01b9bd655eb10c57a236a9e6e7a7 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 fd158fc527a667185181c3a6e5f5fbb4ebd56cd4..a28159fa7869fc66cdfe8c5cebca082f9c622943 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