From 3767b93a128700beb3ce034168bdf4e7c0e67573 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Tue, 22 Mar 2022 19:31:51 +1100
Subject: Add double-click recognition

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

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

diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index dc258d8..7f2f554 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -89,6 +89,12 @@ export default defineComponent({
 				//console.log('Unable to layout tree');
 			}
 		},
+		onInnerLeafDblClicked(layoutNode: LayoutNode){
+			console.log('double clicked leaf: ' + layoutNode.tolNode.name);
+		},
+		onInnerHeaderDblClicked(layoutNode: LayoutNode){
+			console.log('double clicked header: ' + layoutNode.tolNode.name);
+		},
 	},
 	created(){
 		window.addEventListener('resize', this.onResize);
@@ -110,7 +116,8 @@ export default defineComponent({
 	<tile :layoutNode="layoutTree.root"
 		:headerSz="layoutOptions.headerSz" :tileSpacing="layoutOptions.tileSpacing"
 		:transitionDuration="otherOptions.transitionDuration" :isRoot="true"
-		@leaf-clicked="onInnerLeafClicked" @header-clicked="onInnerHeaderClicked"/>
+		@leaf-clicked="onInnerLeafClicked" @header-clicked="onInnerHeaderClicked"
+		@leaf-dbl-clicked="onInnerLeafDblClicked" @header-dbl-clicked="onInnerHeaderDblClicked"/>
 </div>
 </template>
 
-- 
cgit v1.2.3

