ngDraggable icon indicating copy to clipboard operation
ngDraggable copied to clipboard

Ng-Drag-Clone Not appearing in proper position

Open anupkumarsharma opened this issue 8 years ago • 1 comments

Hi, I am using the ng-draggable library on ui-modal window. I am using the clone as below.

I noticed when the drag starts, the new clone element appears on some offset and not exactly overlapping the element. I looked into code and changed the following code in function onmove()

_tx = _mx - _mrx - _dragOffset.left-230; ty = _my - _mry - _dragOffset.top-30;

After the code change its working fine. Not sure the only code which seems likely to be the rootcause can be modal window. like $window.pageXOffset may be returning wrong offset. Also It would be nice to add an additional offsets property to library, incase user want to display the clone some where else. Like imagine a switch which moves element in different divs.

anupkumarsharma avatar May 10 '16 10:05 anupkumarsharma

Fixed in https://github.com/fatlinesofcode/ngDraggable/pull/246/commits/2deb92d88411b31d9ed1beb1cc56316dbbcaf4c3. Waiting for merge.

sathishkumar1911 avatar May 24 '16 20:05 sathishkumar1911