From 18897cec19be24eccf092e22000fdaf7c17ce482 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Wed, 28 Jan 2015 21:08:49 -0500
Subject: [PATCH] global lattice sclae

---
 js/fea/dmaCell.js    | 2 +-
 js/models/lattice.js | 2 +-
 main.html            | 5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/js/fea/dmaCell.js b/js/fea/dmaCell.js
index 48c9c52e..a6e10109 100644
--- a/js/fea/dmaCell.js
+++ b/js/fea/dmaCell.js
@@ -26,7 +26,7 @@
     var cellGeometry1;
     var cellGeometry2;
 
-    var globalCellScale = 30;
+    var globalCellScale = window.defaultLatticeScale;
 
     setGlobalCellScale(globalCellScale);
 
diff --git a/js/models/lattice.js b/js/models/lattice.js
index 7cd78258..9ea75162 100644
--- a/js/models/lattice.js
+++ b/js/models/lattice.js
@@ -6,7 +6,7 @@
 Lattice = Backbone.Model.extend({
 
     defaults: {
-        scale: 30.0,
+        scale: window.defaultLatticeScale,
         cellType: "octa",
         connectionType: "face",
         nodes: [],
diff --git a/main.html b/main.html
index 398fb3ba..d63f1ade 100644
--- a/main.html
+++ b/main.html
@@ -35,6 +35,11 @@
     <!--numerical javascript-->
     <script src="dependencies/numeric-1.2.6.js"></script>
 
+    <!--global variables-->
+    <script>
+        window.defaultLatticeScale = 10;
+    </script>
+
     <!--multi-threading-->
     <script src="js/worker.js"></script>
     <script src="js/persistentWorkers.js"></script><!--global workers-->
-- 
GitLab