Skip to content

Commit

Permalink
updated touch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
fatlinesofcode committed Jan 4, 2015
1 parent 04729c8 commit 14f3d7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ngDraggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ angular.module("ngDraggable", [])
link: function (scope, element, attrs) {
scope.value = attrs.ngDrag;
var offset,_centerAnchor=false,_mx,_my,_tx,_ty,_mrx,_mry;
var _hasTouch = ('ontouchstart' in document.documentElement);
var _hasTouch = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
var _pressEvents = 'touchstart mousedown';
var _moveEvents = 'touchmove mousemove';
var _releaseEvents = 'touchend mouseup';
Expand Down

0 comments on commit 14f3d7e

Please sign in to comment.