From 54d45c698211fac8e5a5bac27f4da1cf635c8ae4 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sun, 16 Oct 2022 15:30:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=94=BE=E6=98=A0?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=94=BB=E7=AC=94=E7=AC=94=E8=A7=A6=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E8=B0=83=E6=95=B4=E6=96=B9=E5=BC=8F=EF=BC=88#162?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MoveablePanel.vue | 6 +++ src/components/WritingBoard.vue | 40 ++++++--------- src/configs/hotkey.ts | 1 - src/views/Screen/PresenterView.vue | 4 +- src/views/Screen/WritingBoardTool.vue | 74 +++++++++++++++++++++++---- 5 files changed, 86 insertions(+), 39 deletions(-) diff --git a/src/components/MoveablePanel.vue b/src/components/MoveablePanel.vue index 2743b703..f55f49b5 100644 --- a/src/components/MoveablePanel.vue +++ b/src/components/MoveablePanel.vue @@ -49,6 +49,10 @@ const props = defineProps({ type: String, default: '', }, + moveable: { + type: Boolean, + default: true, + }, }) const emit = defineEmits<{ @@ -67,6 +71,8 @@ onMounted(() => { }) const startMove = (e: MouseEvent) => { + if (!props.moveable) return + let isMouseDown = true const windowWidth = document.body.clientWidth diff --git a/src/components/WritingBoard.vue b/src/components/WritingBoard.vue index a31109d4..141690f6 100644 --- a/src/components/WritingBoard.vue +++ b/src/components/WritingBoard.vue @@ -15,7 +15,6 @@ @touchend="handleMouseup(); mouseInCanvas = false" @mouseleave="handleMouseup(); mouseInCanvas = false" @mouseenter="mouseInCanvas = true" - @wheel="$event => mousewheelListener($event)" >