From 2b8e7349e61a91f069aa36397491b7c456ad0bce Mon Sep 17 00:00:00 2001 From: leilei Date: Tue, 21 Oct 2025 11:26:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9B=B4=E6=96=B0=E7=94=BB=E6=9D=BF?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/core/index.js | 7 ++++--- src/views/conferencingRoom/index.vue | 6 +++--- src/views/custom/tabulaRase/index.vue | 13 +++++-------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/index.html b/index.html index eaea997..61f1988 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - 互动白板 + xSynergy远程协作系统
diff --git a/src/core/index.js b/src/core/index.js index 34c3456..157ce6d 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -42,7 +42,7 @@ class Canvas extends EventEmitter { const parent = this.canvas.parentElement; if (!parent) return; - const containerWidth = parent.offsetWidth; + const containerWidth = parent.offsetWidth - 150; const containerHeight = parent.offsetHeight; let width = containerWidth; @@ -72,11 +72,12 @@ class Canvas extends EventEmitter { getShapes() { return this.shapes; } setShapes(shapes) { this.shapes = shapes; this.render(); } + // 获取鼠标坐标,转换为百分比坐标 getMouseCoordinates(e) { const rect = this.canvas.getBoundingClientRect(); return { - x: (e.clientX - rect.left) / this.canvas.width, - y: (e.clientY - rect.top) / this.canvas.height + x:((e.clientX - rect.left) / this.canvas.width).toFixed(4), + y:((e.clientY - rect.top) / this.canvas.height).toFixed(4) }; } diff --git a/src/views/conferencingRoom/index.vue b/src/views/conferencingRoom/index.vue index d983105..fdf3f45 100644 --- a/src/views/conferencingRoom/index.vue +++ b/src/views/conferencingRoom/index.vue @@ -216,9 +216,9 @@ - - - + + + -