aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/TileTree.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index ce3507d..d662f50 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -61,16 +61,20 @@ export default defineComponent({
nodeList[0].children = nodeList[0].tolNode.children.map((n: TolNode) => new LayoutNode(n, []));
layoutInfoHooks.updateLayoutInfoOnExpand(nodeList);
//try to re-layout
- if (!this.tryLayout())
+ if (!this.tryLayout()){
nodeList[0].children = [];
+ layoutInfoHooks.updateLayoutInfoOnCollapse(nodeList);
+ }
},
onInnerHeaderClicked(nodeList: LayoutNode[]){
//nodeList is an array of layout-nodes, from the clicked-on-tile's node upward
let children = nodeList[0].children;
nodeList[0].children = [];
layoutInfoHooks.updateLayoutInfoOnCollapse(nodeList);
- if (!this.tryLayout())
+ if (!this.tryLayout()){
nodeList[0].children = children;
+ layoutInfoHooks.updateLayoutInfoOnExpand(nodeList);
+ }
},
tryLayout(){
let newLayout = genLayout(this.layoutTree, [0,0], [this.width,this.height], true);