diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-03-05 11:49:20 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-03-05 12:28:31 +1100 |
| commit | d35bf7ad33156ab154b95f81d911059d80682836 (patch) | |
| tree | 1ecd145ac798dbb5fc8cf58f41214767be9949c2 /src/App.vue | |
| parent | c99767ec9742299f6b262f5df64a05b58da591ec (diff) | |
Separate layout code into new file
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 7 |
1 files changed, 4 insertions, 3 deletions
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> |
