From 2d7d56003d4c5744d77954a840710508b7ca5eda Mon Sep 17 00:00:00 2001
From: lefengyang <lefengyang@tencent.com>
Date: Tue, 18 Aug 2026 23:41:35 +0800
Subject: [PATCH] bugfix

---
 ledApp/pages/addTemplate/addTemplate.vue |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ledApp/pages/addTemplate/addTemplate.vue b/ledApp/pages/addTemplate/addTemplate.vue
index 575f573..f1a9091 100644
--- a/ledApp/pages/addTemplate/addTemplate.vue
+++ b/ledApp/pages/addTemplate/addTemplate.vue
@@ -592,14 +592,14 @@
 			getCellByTouch(touch, cb) {
 				this.getGridRect(rect => {
 					if (!rect) return
-					const x = touch.clientX - rect.left + this.scrollLeft
+					const x = touch.clientX + this.scrollLeft
 					const y = touch.clientY - rect.top
 					const colCount = this.width * (this.modeVal == 2 ? 10 : 1)
 					const cellWidth = rect.width / colCount
 					const cellHeight = rect.height / this.height
 					const colIndex = Math.floor(x / cellWidth)
 					const rowIndex = Math.floor(y / cellHeight)
-					console.log('colCount', colCount, 'rowIndex', rowIndex, 'colIndex', colIndex)
+					//console.log('colCount', colCount, 'rowIndex', rowIndex, 'colIndex', colIndex, x, cellWidth)
 					if (
 						colIndex >= 0 && colIndex < colCount &&
 						rowIndex >= 0 && rowIndex < this.height

--
Gitblit v1.10.0