moveable icon indicating copy to clipboard operation
moveable copied to clipboard

How can I stop Dragging?

Open ZRichV opened this issue 2 years ago • 1 comments

Environments

  • Framework name: vue
  • Framework version: vue 2.5.22
  • Moveable Component version: 0.27.3

Description

In my situation, I need to delay the dragStart when mouse down, but the moveable prevents the mouseup event, so I can't cancel delay. And the result is that the moveable can still move even if the mouse is not pressed. so i need to trigger dragend when moveable is dragging.

ZRichV avatar Apr 27 '22 04:04 ZRichV

@ZRichV

There is an e.stop() function in the dragStart event. When called, the dragging stops. However, there is no blocking event in the drag event.

daybrush avatar Apr 27 '22 17:04 daybrush

@Frhazz

Oh, use stopDrag function property

daybrush avatar Oct 29 '22 03:10 daybrush

@daybrush I needed to upgrade, I'm getting stopDrag now, all good :) Thanks for this great lib btw!

FranckPoingt avatar Oct 29 '22 03:10 FranckPoingt

@daybrush i have related question. how can force stop dragging from outside? stopDrag is not the case when mouse goes to iframe, no events fired. i had hacky solution with firing dragEnd event, but it is not working on never version. is where a proper way to do that?

cherepanov avatar Nov 06 '22 10:11 cherepanov

@cherepanov

Please add it as a separate issue. It will be supported in the next version.

daybrush avatar Nov 06 '22 14:11 daybrush