In the moveNode event, in the ui we get 3 array values in "args":
0: The nodes that have been moved
1: The new parent (null if root)
2: The new position starting from 1 within the siblings
In the function for the moveNode event; when dragged to the root, args[1] is null, so to get the siblings I need to call Tree.getRoots() which is where the issue is, as this is the data and order is BEFORE the move, whereas args[1].children is the data and order AFTER the move.
As I am using the nested set model in my database (LFT & RGT), there is no way to determine the sibling the moved node is being inserted after.
As moveNode is called AFTER the drag and drop, Tree.getRoots() should be the order and data after the drop, just like args[1].children is.