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 @@
-
-
-
+
+
+
-