diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-03-10 21:44:44 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-03-10 21:44:44 +1100 |
| commit | 6677c0419908954fd1edf531a7bbc3dc6902724e (patch) | |
| tree | 8c70d73d01d27d9e9fbac2dec6e32f54c0469471 /src/components/TileTree.vue | |
| parent | 0b309b2a98ed0ca14e5fdd81aead1ca8a5884c13 (diff) | |
Move layout-info functions into one place
Diffstat (limited to 'src/components/TileTree.vue')
| -rw-r--r-- | src/components/TileTree.vue | 8 |
1 files changed, 4 insertions, 4 deletions
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(){ |
