From 2e4331783e2e86396703620656a7005d4d84ecff Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 10 Mar 2022 13:38:57 +1100
Subject: Make empty-space-shifting apply recursively. Add temp-node and layout
 names for debugging.

---
 src/components/TileTree.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/TileTree.vue')

diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index 4ce3f28..dd91fcb 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -11,7 +11,7 @@ function preprocessTol(tree){
 }
 preprocessTol(tol);
 
-import {staticSqrLayout, staticRectLayout, sweepToSideLayout} from '/src/layout.js';
+import {staticSqrLayout, staticRectLayout, sweepToSideLayout, shiftEmpty} from '/src/layout.js';
 let LAYOUT_SYS = sweepToSideLayout;
 
 export default {
@@ -71,6 +71,7 @@ export default {
 		},
 		tryLayout(){
 			let layout = LAYOUT_SYS.genLayout(this.tree, 0, 0, this.width, this.height, true);
+			shiftEmpty(layout);
 			if (layout == null){
 				console.log('Unable to layout tree');
 				return false;
-- 
cgit v1.2.3

