Skip to content

Commit

Permalink
Merge pull request #166 from rustico/rustico_fix_ngdragclone_scrolling
Browse files Browse the repository at this point in the history
Fix ngDragClone when the page scrolls
  • Loading branch information
fatlinesofcode committed Aug 12, 2015
2 parents 31bb08b + bb2130a commit d31a7a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ngDraggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ angular.module("ngDraggable", [])

moveElement(_tx, _ty);

$rootScope.$broadcast('draggable:move', { x: _mx, y: _my, tx: _tx, ty: _ty, event: evt, element: element, data: _data, uid: _myid });
$rootScope.$broadcast('draggable:move', { x: _mx, y: _my, tx: _tx, ty: _ty, event: evt, element: element, data: _data, uid: _myid, dragOffset: _dragOffset });
};

var onrelease = function(evt) {
Expand Down Expand Up @@ -421,13 +421,12 @@ angular.module("ngDraggable", [])
moveElement(obj.tx, obj.ty);
}

_dragOffset = element[0].getBoundingClientRect();//ngDraggable.getPrivOffset(element);
};
var onDragMove = function(evt, obj) {
if(_allowClone) {

_tx = obj.tx + _dragOffset.left;
_ty = obj.ty + _dragOffset.top;
_tx = obj.tx + obj.dragOffset.left;
_ty = obj.ty + obj.dragOffset.top;

moveElement(_tx, _ty);
}
Expand Down

1 comment on commit d31a7a3

@Krishna9331
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fatlinesofcode @rustico could you please tag this merge/commit and release it to bower by bumping the version. current bower install is not downloading the code for page scroll. Please do it ASAP

Please sign in to comment.