Open yashikagarg13 opened 9 years ago
@fatlinesofcode Please reply on this asap!
I am failing this test
var hitTest = function(x, y) {
var bounds = element[0].getBoundingClientRect();// ngDraggable.getPrivOffset(element);
x -= $document[0].body.scrollLeft + $document[0].documentElement.scrollLeft;
y -= $document[0].body.scrollTop + $document[0].documentElement.scrollTop;
return x >= bounds.left
&& x <= bounds.right
&& y <= bounds.bottom
&& y >= bounds.top;
};
What is it about?
@fatlinesofcode
Having the issue, try replacing
$document.on(_moveEvents, onmove);
$document.on(_releaseEvents, onrelease);
in onlongpress function by
if(_hasTouch){
if (_dragHandle) {
_dragHandle.on(_moveEvents, onmove);
_dragHandle.on(_releaseEvents, onrelease);
}else{
element.on(_moveEvents, onmove);
element.on(_releaseEvents, onrelease);
}
}else{
$document.on(_moveEvents, onmove);
$document.on(_releaseEvents, onrelease);
}
I'm having the same issue with onDragSuccess and onDropSuccess never getting called. I'm developing for mobile using Ionic. I tried your solution @SandrineProusteau, but it didn't fix it for me.
For me the problem was here in the onDragEnd function:
if (!_dropEnabled || _myid === obj.uid) {
updateDragStyles(false, obj.element);
return;
}
_myid === obj.uid was always evaluating to true, so the function kept returning early. I removed this check and it works now.
@yashikagarg13 I am also failing same test. Can you help me out. And this is happening in only IE.
Hi
When I test my code in device mode of chorme, onDragSuccess and onDropSuccess never get fired. Also, on "draggable:start" I get this as $event
Any ideas what could be the reason? Is it anything related to order of jQuery and angular.js. I am using jQuery and do not want to use JQLite but full jQuery version