aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-03-06 15:18:47 +1100
committerTerry Truong <terry06890@gmail.com>2022-03-06 15:18:47 +1100
commit0e760e15180f7714ded5949cdb4a497311883199 (patch)
tree1112b3354a6819d83e472e487e26cf92c96fb0ce /src/components
parent8ec65b8c7d2c3b4e39d1d705810541b797195775 (diff)
Improve layouts by using arFromArea() funcs as layout-info, and improving tile-header awareness
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Tile.vue4
-rw-r--r--src/components/TileTree.vue2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index 753922d..1693349 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -20,9 +20,7 @@ export default {
layout(){
if (this.tree.children.length == 0)
return {};
- let hOffset = (this.hideHeader ? 0 : this.layoutSys.HEADER_SZ);
- let x = 0, y = hOffset, w = this.width, h = this.height - hOffset;
- return this.layoutSys.genLayout(this.tree.children, 0, hOffset, this.width, this.height - hOffset);
+ return this.layoutSys.genLayout(this.tree.children, 0, 0, this.width, this.height, this.hideHeader);
}
},
methods: {
diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index 3f3f0f5..b1fb3fd 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -41,8 +41,8 @@ export default {
},
onInnerHeaderClicked(nodeList){
//nodeList will hold an array of tree-objects, from the clicked-on-tile's tree-object upward
- this.layoutSys.updateLayoutInfoOnCollapse(nodeList);
nodeList[0].children = [];
+ this.layoutSys.updateLayoutInfoOnCollapse(nodeList);
},
},
created(){