From 3c28e159ffcc7c9d3324a7d94408130cee50476f Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Wed, 4 Feb 2015 00:48:55 -0500
Subject: [PATCH] moving stuff around

---
 js/models/Lattice.js | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/js/models/Lattice.js b/js/models/Lattice.js
index b3d9e3b1..7137f180 100644
--- a/js/models/Lattice.js
+++ b/js/models/Lattice.js
@@ -66,22 +66,6 @@ Lattice = Backbone.Model.extend({
         window.three.render();
     },
 
-    _checkForMatrixExpansion: function(cells, indices){
-
-        var lastMax = this.get("cellsMax");
-        var lastMin = this.get("cellsMin");
-        var newMax = this._updateCellsMax(indices, lastMax);
-        var newMin = this._updateCellsMin(indices, lastMin);
-        if (newMax) {
-            this._expandCellsArray(cells, this._subtract(newMax, lastMax), false);
-            this.set("cellsMax", newMax);
-        }
-        if (newMin) {
-            this._expandCellsArray(cells, this._subtract(lastMin, newMin), true);
-            this.set("cellsMin", newMin);
-        }
-    },
-
     removeCell: function(cell){
         if (!cell) return;
         var index = this._subtract(cell.indices, this.get("cellsMin"));
@@ -112,6 +96,22 @@ Lattice = Backbone.Model.extend({
     ///////////////////////////////CELLS ARRAY//////////////////////////////////////////
     ////////////////////////////////////////////////////////////////////////////////////
 
+    _checkForMatrixExpansion: function(cells, indices){
+
+        var lastMax = this.get("cellsMax");
+        var lastMin = this.get("cellsMin");
+        var newMax = this._updateCellsMax(indices, lastMax);
+        var newMin = this._updateCellsMin(indices, lastMin);
+        if (newMax) {
+            this._expandCellsArray(cells, this._subtract(newMax, lastMax), false);
+            this.set("cellsMax", newMax);
+        }
+        if (newMin) {
+            this._expandCellsArray(cells, this._subtract(lastMin, newMin), true);
+            this.set("cellsMin", newMin);
+        }
+    },
+
     _expandCellsArray: function(cells, expansion, fromFront){
 
         _.each(_.keys(expansion), function(key){
-- 
GitLab