xieziyu / angular2-draggable

Angular directive (for version >= 2.x ) that makes the DOM element draggable and resizable
https://xieziyu.github.io/angular2-draggable/
294 stars 103 forks source link

Toggle [ngDraggable] while dragging #144

Closed agnitos closed 5 years ago

agnitos commented 5 years ago

If you toggle ngDraggable while you are dragging you get some wierd behaviour. If you start to drag while its set to true and change it to false while its dragging it will stop, but if you then set it to true it will jump it mouse location. drag-start-when-true

I think this shouldn't work like this, if you set ngDraggable to false while you are dragging it should put the draggable down.

There is the similar issue when you start to drag when ngDraggable is set to false, it will update its position as if you are dragging when it gets set to true. drag-start-when-false

It shouldn't start to drag if ngDraggable is set to false.

xieziyu commented 5 years ago

Thanks