aboutsummaryrefslogtreecommitdiff
path: root/src/components/TileTree.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/TileTree.vue')
-rw-r--r--src/components/TileTree.vue16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index 8ba5048..ed7eb87 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -78,7 +78,7 @@ export default defineComponent({
wideArea(): boolean{
return this.width >= this.height;
},
- separatedParents(): LayoutNode[] | null {
+ sepdParents(): LayoutNode[] | null {
if (this.activeRoot == this.layoutTree){
return null;
}
@@ -92,7 +92,7 @@ export default defineComponent({
},
tileAreaPos(){
let pos = [this.tileAreaOffset, this.tileAreaOffset] as [number, number];
- if (this.separatedParents != null){
+ if (this.sepdParents != null){
if (this.wideArea){
pos[0] += this.parentBarSz;
} else {
@@ -106,7 +106,7 @@ export default defineComponent({
this.width - this.tileAreaOffset*2,
this.height - this.tileAreaOffset*2
] as [number, number];
- if (this.separatedParents != null){
+ if (this.sepdParents != null){
if (this.wideArea){
dims[0] -= this.parentBarSz;
} else {
@@ -184,6 +184,11 @@ export default defineComponent({
this.activeRoot = layoutNode;
tryLayout(layoutNode, this.tileAreaPos, this.tileAreaDims, this.layoutOptions, true);
},
+ onSepdParentClicked(layoutNode: LayoutNode){
+ LayoutNode.showDownward(layoutNode);
+ this.activeRoot = layoutNode;
+ tryLayout(layoutNode, this.tileAreaPos, this.tileAreaDims, this.layoutOptions, true);
+ },
// For preventing double-clicks from highlighting text
onMouseDown(evt: UIEvent){
if (evt.detail == 2){
@@ -211,8 +216,9 @@ export default defineComponent({
:headerSz="layoutOptions.headerSz" :tileSpacing="layoutOptions.tileSpacing" :options="componentOptions"
@leaf-clicked="onInnerLeafClicked" @header-clicked="onInnerHeaderClicked"
@leaf-dbl-clicked="onInnerLeafDblClicked" @header-dbl-clicked="onInnerHeaderDblClicked"/>
- <parent-bar v-if="separatedParents != null"
- :pos="[0,0]" :dims="parentBarDims" :nodes="separatedParents" :options="componentOptions"/>
+ <parent-bar v-if="sepdParents != null"
+ :pos="[0,0]" :dims="parentBarDims" :nodes="sepdParents" :options="componentOptions"
+ @sepd-parent-clicked="onSepdParentClicked"/>
</div>
</template>