{"action":"created","issue":{"url":"https://api.github.com/repos/taye/interact.js/issues/214","labels_url":"https://api.github.com/repos/taye/interact.js/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/taye/interact.js/issues/214/comments","events_url":"https://api.github.com/repos/taye/interact.js/issues/214/events","html_url":"https://github.com/taye/interact.js/issues/214","id":89817040,"number":214,"title":"Delay Option for drag and resize","user":{"login":"razvanphp","id":4599319,"avatar_url":"https://avatars.githubusercontent.com/u/4599319?v=3","gravatar_id":"","url":"https://api.github.com/users/razvanphp","html_url":"https://github.com/razvanphp","followers_url":"https://api.github.com/users/razvanphp/followers","following_url":"https://api.github.com/users/razvanphp/following{/other_user}","gists_url":"https://api.github.com/users/razvanphp/gists{/gist_id}","starred_url":"https://api.github.com/users/razvanphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razvanphp/subscriptions","organizations_url":"https://api.github.com/users/razvanphp/orgs","repos_url":"https://api.github.com/users/razvanphp/repos","events_url":"https://api.github.com/users/razvanphp/events{/privacy}","received_events_url":"https://api.github.com/users/razvanphp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-20T20:56:55Z","updated_at":"2015-06-21T09:29:08Z","closed_at":null,"body":"After successfully implemented your library, the client pointed out that some small usability changes need to be made.\r\n\r\nTo be precise, on a draggable and resizable element on mobile phones or touch devices, you can easily and unintentionally drag the element when you scroll.\r\n\r\nI tried to use `manualStart` option but this seems a little bit over engineered, given that I only want to add a delay to the action (btw, hold delay is not configurable).\r\n\r\nThe next problem was that this becomes tricky when you also have resizable, because for some reason, the event I get in `resizeMove` does not contain `rect` property so it's kinda useless. Also one has to check for the target to know if he should drag or resize.\r\n\r\nSo, maybe it's easy to implement this delay option for both actions, this would also add a lot more flexibility.\r\n\r\nPS: there is also a small bug that cursor still changes when `manualStart` is true.\r\n\r\nThank you!\r\n"},"comment":{"url":"https://api.github.com/repos/taye/interact.js/issues/comments/113879937","html_url":"https://github.com/taye/interact.js/issues/214#issuecomment-113879937","issue_url":"https://api.github.com/repos/taye/interact.js/issues/214","id":113879937,"user":{"login":"taye","id":1679746,"avatar_url":"https://avatars.githubusercontent.com/u/1679746?v=3","gravatar_id":"","url":"https://api.github.com/users/taye","html_url":"https://github.com/taye","followers_url":"https://api.github.com/users/taye/followers","following_url":"https://api.github.com/users/taye/following{/other_user}","gists_url":"https://api.github.com/users/taye/gists{/gist_id}","starred_url":"https://api.github.com/users/taye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taye/subscriptions","organizations_url":"https://api.github.com/users/taye/orgs","repos_url":"https://api.github.com/users/taye/repos","events_url":"https://api.github.com/users/taye/events{/privacy}","received_events_url":"https://api.github.com/users/taye/received_events","type":"User","site_admin":false},"created_at":"2015-06-21T09:29:08Z","updated_at":"2015-06-21T09:29:08Z","body":">I tried to use manualStart option but this seems a little bit over engineered, given that I only want to add a delay to the action (btw, hold delay is not configurable).\r\n\r\nIt's not documented but you can change the hold delay with \r\n\r\n```javascript\r\ninteract.debug().defaultOptions._holdDuration = timeInMilliseconds;\r\n```\r\n\r\n>The next problem was that this becomes tricky when you also have resizable, because for some reason, the event I get in resizeMove does not contain rect property so it's kinda useless.\r\n\r\nIf you mean that you don't get `event.rect` with `manualStart` resize, the solution is to add an `edges` object to the action object passed to `Interaction#start`. See #206.\r\n\r\n>Also one has to check for the target to know if he should drag or resize.\r\n\r\nAgain not documented, but you can use [`Interaction#getAction`](https://github.com/taye/interact.js/blob/86932d7ca5abb5f5fa36471bbb405b25762c4f5e/interact.js#L4544)  to make things a little easier.\r\n\r\n>So, maybe it's easy to implement this delay option for both actions, this would also add a lot more flexibility.\r\n\r\nThis sounds like a good idea and I don't think it should be difficult. However, I won't be able to work on it for a few weeks so you'll have to use `manualStart` for now."}}