{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/issues/648","labels_url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/issues/648/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/issues/648/comments","events_url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/issues/648/events","html_url":"https://github.com/angular-ui-tree/angular-ui-tree/pull/648","id":116927486,"number":648,"title":"Remove scope dependency","user":{"login":"Voles","id":1725563,"avatar_url":"https://avatars.githubusercontent.com/u/1725563?v=3","gravatar_id":"","url":"https://api.github.com/users/Voles","html_url":"https://github.com/Voles","followers_url":"https://api.github.com/users/Voles/followers","following_url":"https://api.github.com/users/Voles/following{/other_user}","gists_url":"https://api.github.com/users/Voles/gists{/gist_id}","starred_url":"https://api.github.com/users/Voles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voles/subscriptions","organizations_url":"https://api.github.com/users/Voles/orgs","repos_url":"https://api.github.com/users/Voles/repos","events_url":"https://api.github.com/users/Voles/events{/privacy}","received_events_url":"https://api.github.com/users/Voles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-14T14:14:47Z","updated_at":"2015-12-10T22:38:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/pulls/648","html_url":"https://github.com/angular-ui-tree/angular-ui-tree/pull/648","diff_url":"https://github.com/angular-ui-tree/angular-ui-tree/pull/648.diff","patch_url":"https://github.com/angular-ui-tree/angular-ui-tree/pull/648.patch"},"body":"This PR is a follow up on #596. It list's the places where we rely on getting / setting the `scope()` of DOM-nodes.\r\n\r\n- [x] **`expandAll()` and `collapseAll()` methods of the tree**  \r\nThe methods loop recursively through the tree nodes and trigger their `expand()` or `collapse()` methods per node. This can be replaced by listening to these events instead of adding method on the `scope()` object.\r\n- [x] **`dragStart()` function of a node**  \r\nThe `dragStart()` method uses the scope of the element to check if a node or the handler is clicked.\r\n- [x] **out of bounds check**  \r\nCheck in the [uiTreeNode.js](https://github.com/angular-ui-tree/angular-ui-tree/blob/5fd4194b91c38f0b90423f3c34cd74476afec4cc/source/directives/uiTreeNode.js#L296) file.\r\n- [ ] **dragMove() function of a node**  \r\nWhen moving, the `scope()` of a node element is used to perform checks on the tree root and the element being dragged.\r\n\r\n@angular-ui-tree/developers feel free to add more dependencies on the `scope()` method to the list."},"comment":{"url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/issues/comments/163774267","html_url":"https://github.com/angular-ui-tree/angular-ui-tree/pull/648#issuecomment-163774267","issue_url":"https://api.github.com/repos/angular-ui-tree/angular-ui-tree/issues/648","id":163774267,"user":{"login":"Voles","id":1725563,"avatar_url":"https://avatars.githubusercontent.com/u/1725563?v=3","gravatar_id":"","url":"https://api.github.com/users/Voles","html_url":"https://github.com/Voles","followers_url":"https://api.github.com/users/Voles/followers","following_url":"https://api.github.com/users/Voles/following{/other_user}","gists_url":"https://api.github.com/users/Voles/gists{/gist_id}","starred_url":"https://api.github.com/users/Voles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voles/subscriptions","organizations_url":"https://api.github.com/users/Voles/orgs","repos_url":"https://api.github.com/users/Voles/repos","events_url":"https://api.github.com/users/Voles/events{/privacy}","received_events_url":"https://api.github.com/users/Voles/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T22:38:37Z","updated_at":"2015-12-10T22:38:37Z","body":"@Smolations I'm still working on it. The `dragMove` handler is actually more complex than I thought. Getting there, but still need some time to investigate and refactor."}}