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); + } });