From 93b54f4351989ba74d42acc4979a16f5f7307a9b Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Sun, 1 Sep 2024 23:57:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BF=A1=E6=A0=87=20bug=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pivot/index.vue | 1 + src/components/pivot/moving-pivot.vue | 9 ++++++++- src/components/pivot/user-pivot.vue | 21 ++++++--------------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/components/pivot/index.vue b/src/components/pivot/index.vue index 4ee08b6..727d669 100644 --- a/src/components/pivot/index.vue +++ b/src/components/pivot/index.vue @@ -3,6 +3,7 @@
{ - if (vline.dragEnable === false || vline.delayTag === true) { + if (vline.dragEnable === false) { return; - } - console.log('move pivot', vline); - + } const x = event.clientX || event.x; pivot.x = x; const pstate = globalLookup.pstate; @@ -172,16 +169,6 @@ function onVLineMousedown() { }); } -document.onmouseup = () => { - vline.delayTag = true; - console.log('mouse up'); - console.log(vline); - setTimeout(() => { - vline.delayTag = false; - }, 300); - onVLineMouseup(); -} - function onVLineMouseup() { MovingPivot.dragEnable = false; mousemoveEventPipes.delete(props.id); @@ -239,6 +226,10 @@ function displayRelativeAxis() { onMounted(() => { UserPivotCtxShows.set(props.id, false); + const wrapper = document.getElementById('vcd-render-wrapper'); + if (wrapper instanceof HTMLElement) { + wrapper.addEventListener('mouseup', onVLineMouseup); + } });