{"action":"created","issue":{"url":"https://api.github.com/repos/fatlinesofcode/ngDraggable/issues/85","labels_url":"https://api.github.com/repos/fatlinesofcode/ngDraggable/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/fatlinesofcode/ngDraggable/issues/85/comments","events_url":"https://api.github.com/repos/fatlinesofcode/ngDraggable/issues/85/events","html_url":"https://github.com/fatlinesofcode/ngDraggable/issues/85","id":57611304,"number":85,"title":"Adding a touch-event","user":{"login":"tempflip","id":709061,"avatar_url":"https://avatars.githubusercontent.com/u/709061?v=3","gravatar_id":"","url":"https://api.github.com/users/tempflip","html_url":"https://github.com/tempflip","followers_url":"https://api.github.com/users/tempflip/followers","following_url":"https://api.github.com/users/tempflip/following{/other_user}","gists_url":"https://api.github.com/users/tempflip/gists{/gist_id}","starred_url":"https://api.github.com/users/tempflip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tempflip/subscriptions","organizations_url":"https://api.github.com/users/tempflip/orgs","repos_url":"https://api.github.com/users/tempflip/repos","events_url":"https://api.github.com/users/tempflip/events{/privacy}","received_events_url":"https://api.github.com/users/tempflip/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-13T15:24:34Z","updated_at":"2015-03-12T02:03:45Z","closed_at":"2015-03-12T02:03:45Z","body":"Hi All,\r\n\r\nwe are using ngDraggable in our project, and were needed a specific 'touch' event, which is triggered when a dragged element is hovering over a droppable element. I am aware that there is an ngDragMove event on the ngDrop directive, however, it is fired all the time when an element is moved, so that's not exactly what we needed.\r\n\r\nWe've came up with a possible solution.\r\nIn HTML:\r\n``` <div ng-drop=\"true\" ng-drop-success=\"columnDropped($data, $event)\" ng-touching-action=\"touched()\" />```\r\n\r\n\r\nIn the ngDrop directive : \r\n```javascript\r\n    var onTouchAction = $parse(attrs.ngTouchingAction);\r\n\r\n.\r\n.\r\n.\r\n                    var isTouching = function(mouseX, mouseY, dragElement) {\r\n                        var touching= hitTest(mouseX, mouseY);\r\n                        updateDragStyles(touching, dragElement);\r\n                        //*** added by peter***\r\n                        fireTouchingAction(touching, dragElement);\r\n                        ///\r\n                        return touching;\r\n                    }\r\n\r\n.\r\n.\r\n.\r\n                    var fireTouchingAction = function(touching, dragElement) {\r\n                        if(touching){\r\n                            if (attrs.ngTouchingAction != undefined) {\r\n                                onTouchAction(scope);\r\n                            }\r\n                        }\r\n                    }\r\n```\r\n\r\nWhat do you think about this solution? Any better ideas? Maybe something similar could be implemented in the future?\r\n\r\nthanks!"},"comment":{"url":"https://api.github.com/repos/fatlinesofcode/ngDraggable/issues/comments/78411055","html_url":"https://github.com/fatlinesofcode/ngDraggable/issues/85#issuecomment-78411055","issue_url":"https://api.github.com/repos/fatlinesofcode/ngDraggable/issues/85","id":78411055,"user":{"login":"fatlinesofcode","id":505776,"avatar_url":"https://avatars.githubusercontent.com/u/505776?v=3","gravatar_id":"","url":"https://api.github.com/users/fatlinesofcode","html_url":"https://github.com/fatlinesofcode","followers_url":"https://api.github.com/users/fatlinesofcode/followers","following_url":"https://api.github.com/users/fatlinesofcode/following{/other_user}","gists_url":"https://api.github.com/users/fatlinesofcode/gists{/gist_id}","starred_url":"https://api.github.com/users/fatlinesofcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatlinesofcode/subscriptions","organizations_url":"https://api.github.com/users/fatlinesofcode/orgs","repos_url":"https://api.github.com/users/fatlinesofcode/repos","events_url":"https://api.github.com/users/fatlinesofcode/events{/privacy}","received_events_url":"https://api.github.com/users/fatlinesofcode/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T02:03:45Z","updated_at":"2015-03-12T02:03:45Z","body":"I've added a scope variable within ngDrop. You should be able to bind or watch that."}}