From c97a60b2c013d4726d4269e648f7a95afee4aeb8 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 24 Mar 2022 18:12:01 +1100
Subject: Recognise click-and-hold instead of double-click

---
 src/components/TileImg.vue | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

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

diff --git a/src/components/TileImg.vue b/src/components/TileImg.vue
index 2445f98..7e44f2a 100644
--- a/src/components/TileImg.vue
+++ b/src/components/TileImg.vue
@@ -74,10 +74,8 @@ export default defineComponent({
 				this.highlight = false;
 			}
 		},
-		onClick(evt: Event){
-			if (this.isExpandable){
-				this.highlight = false;
-			}
+		onMouseDown(evt: Event){
+			this.highlight = false;
 		},
 		onInfoMouseEnter(evt: Event){
 			this.infoMouseOver = true;
@@ -94,7 +92,7 @@ export default defineComponent({
 </script>
 
 <template>
-<div :style="styles" @mouseenter="onMouseEnter" @mouseleave="onMouseLeave" @click="onClick"
+<div :style="styles" @mouseenter="onMouseEnter" @mouseleave="onMouseLeave" @mousedown="onMouseDown"
 	:class="isExpandable ? ['hover:cursor-pointer'] : []">
 	<h1 :style="headerStyles">{{layoutNode.tolNode.name}}</h1>
 	<svg :style="infoIconStyles" class="hover:cursor-pointer"
-- 
cgit v1.2.3

