-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Callback Routing #673
Fix Callback Routing #673
Conversation
… callback was set in the same scope. Deleted redundent function from TreeNodeController, and updated the function in TreeNodesController to trigger callback
btw, I recommend doing gulp test before merging, I couldn't do it from my office computer... |
@@ -456,7 +450,7 @@ | |||
// and the 'max-depth' attribute in `ui-tree` or `ui-tree-nodes`. | |||
// the method can be overrided | |||
callbacks.accept = function (sourceNodeScope, destNodesScope, destIndex) { | |||
return !(destNodesScope.nodropEnabled || destNodesScope.outOfDepth(sourceNodeScope)); | |||
return !(destNodesScope.nodropEnabled || destNodesScope.$treeScope.nodropEnabled || destNodesScope.outOfDepth(sourceNodeScope)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't mine!
Probably an earlier fix that some how slipped 'gulp build'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you've merged master into this branch, or rebased onto master?
There's a little conversation going on about this in the issues here: #586 Thanks for fixing, hopefully it will get merged here soon. |
@IdanCo thanks for your work! I've reviewed your PR and it's looks ok to merge. Do you have some time to bring your branch up to date with master? I suggest to remove the Thanks! |
@IdanCo any updates on this? :-) |
On it! |
# Conflicts: # dist/angular-ui-tree.min.js
Done! |
Thank you very much, @IdanCo! 🍰 |
Any thought on the issue documented with the removed callback being hit when re-ordering nodes? |
Function 'removed' in TreeNodeController referred to parent scope, but callback was set in the same scope. Deleted redundent function from TreeNodeController, and updated the function in TreeNodesController to trigger callback.