From 6677c0419908954fd1edf531a7bbc3dc6902724e Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 10 Mar 2022 21:44:44 +1100
Subject: Move layout-info functions into one place

---
 src/components/TileTree.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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

diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index 68e180d..0e27c0d 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -11,7 +11,7 @@ function preprocessTol(tree){
 }
 preprocessTol(tol);
 
-import {staticSqrLayout, staticRectLayout, sweepToSideLayout, shiftEmpty} from '/src/layout.js';
+import {staticSqrLayout, staticRectLayout, sweepToSideLayout, layoutInfoHooks, shiftEmpty} from '/src/layout.js';
 let LAYOUT_SYS = sweepToSideLayout;
 
 export default {
@@ -40,7 +40,7 @@ export default {
 				return tree;
 			}
 			initTreeRec(tree, lvl);
-			LAYOUT_SYS.initLayoutInfo(tree)
+			layoutInfoHooks.initLayoutInfo(tree)
 			return tree;
 		},
 		onResize(){
@@ -65,14 +65,14 @@ export default {
 				tolNode: tNode, children: [],
 				x:0, y:0, w:0, h:0, headerSz:0,
 			}));
-			LAYOUT_SYS.updateLayoutInfoOnExpand(nodeList);
+			layoutInfoHooks.updateLayoutInfoOnExpand(nodeList);
 			//try to layout tree
 			if (!this.tryLayout())
 				nodeList[0].children = [];
 		},
 		onInnerHeaderClicked(nodeList){ //nodeList is array of tree-objects, from clicked-on-tile's tree-object upward
 			nodeList[0].children = [];
-			LAYOUT_SYS.updateLayoutInfoOnCollapse(nodeList);
+			layoutInfoHooks.updateLayoutInfoOnCollapse(nodeList);
 			this.tryLayout();
 		},
 		tryLayout(){
-- 
cgit v1.2.3

