-
Notifications
You must be signed in to change notification settings - Fork 438
Context 'this' points to window object #251
Comments
Since one of the points of directives is to abstract away DOM and discourage manipulations, I never though of providing this feature to the wrapped callbacks of ui-sortable. |
I wanted 'this' parameter to figure out the connected lists i.e find out whether the update call is from the item being moved in its own list or to another list. Here is how I fixed it. if(ui.sender !==null){
console.log('item dropped from another list');
}
else if(ui.item.sortable.droptarget[0] === ui.item.parent()[0]){
console.log('item dropped from same list');
} So the 'this' values is redundant. Thanks and cheers |
You can also check Glad i could help. |
#323 tries to fix this. |
Here is the demo http://codepen.io/anon/pen/AbouB?editors=001
Shouldn't it actually point to ui.item.parent()[0]?
The text was updated successfully, but these errors were encountered: