From d35bf7ad33156ab154b95f81d911059d80682836 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 5 Mar 2022 11:49:20 +1100
Subject: Separate layout code into new file

---
 src/App.vue | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index 08b442c..5c33543 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -9,11 +9,12 @@ function addChildArrays(tree){
 }
 addChildArrays(tol);
 
-import TileTree from "./components/TileTree.vue";
+import {initTree} from './components/layout.js';
+import TileTree from './components/TileTree.vue';
 export default {
 	data() {
 		return {
-			tree: {tolNode: tol, children: []},
+			tree: initTree(tol, 1),
 			width: document.documentElement.clientWidth,
 			height: document.documentElement.clientHeight,
 		}
@@ -38,7 +39,7 @@ export default {
 
 <template>
 <div class="h-[100vh]">
-	<tile-tree :treeIn="tree" :x="0" :y="0" :width="width" :height="height" isRoot></tile-tree>
+	<tile-tree :tree="tree" :x="0" :y="0" :width="width" :height="height" isRoot></tile-tree>
 </div>
 </template>
 
-- 
cgit v1.2.3

