From 7f56bd873b7391350d0379f497d0d0881486f867 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sat, 5 Mar 2022 13:07:21 +1100
Subject: Separate some of TileTree.vue into Tile.vue

---
 src/App.vue | 34 ++--------------------------------
 1 file changed, 2 insertions(+), 32 deletions(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index 5c33543..3e95082 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,36 +1,6 @@
 <script>
-import tol from './tol.json';
-function addChildArrays(tree){
-	if (!tree.children){
-		tree.children = [];
-	} else {
-		tree.children.forEach(addChildArrays);
-	}
-}
-addChildArrays(tol);
-
-import {initTree} from './components/layout.js';
 import TileTree from './components/TileTree.vue';
 export default {
-	data() {
-		return {
-			tree: initTree(tol, 1),
-			width: document.documentElement.clientWidth,
-			height: document.documentElement.clientHeight,
-		}
-	},
-	methods: {
-		onResize(){
-			this.width = document.documentElement.clientWidth;
-			this.height = document.documentElement.clientHeight;
-		},
-	},
-	created(){
-		window.addEventListener('resize', this.onResize);
-	},
-	unmounted(){
-		window.removeEventListener('resize', this.onResize);
-	},
 	components: {
 		TileTree
 	}
@@ -38,8 +8,8 @@ export default {
 </script>
 
 <template>
-<div class="h-[100vh]">
-	<tile-tree :tree="tree" :x="0" :y="0" :width="width" :height="height" isRoot></tile-tree>
+<div>
+	<tile-tree></tile-tree>
 </div>
 </template>
 
-- 
cgit v1.2.3

