From 6d2a8eedb65edb4622c661e8a4531176c05d3431 Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Sat, 17 Aug 2013 21:44:24 +0200
Subject: [PATCH] Fix bug in spirallayout addTile

---
 contents/code/spirallayout.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contents/code/spirallayout.js b/contents/code/spirallayout.js
index 9308e9e..67420fc 100644
--- a/contents/code/spirallayout.js
+++ b/contents/code/spirallayout.js
@@ -87,9 +87,10 @@ SpiralLayout.prototype.addTile = function() {
             newRect.width = splitX;
             break;
         }
+		this.tiles[this.tiles.length - 1].rectangle = lastRect;
         this._createTile(newRect);
     }
-    var lastRect = this.tiles[this.tiles.length - 1].rectangle;
+    //var lastRect = this.tiles[this.tiles.length - 1].rectangle;
 }
 
 SpiralLayout.prototype.removeTile = function(tileIndex) {
-- 
GitLab