As a suggestion, you can always debug the code yourself using the console.log() and checking what the ui variable is actually pointing to and debug more to find the object properties it have and then find that current element being dragged, as we have discussed in the comments above like: