How to access to dropped element? drop(event, ui) not works in jqyoui-options
See original GitHub issueI just writed this in template:
jqyoui-options="droppableOptions"
And in controller:
$scope.droppableOptions = {
drop: function(event, ui){
console.log('drop ui', ui);
},
...
}
But it don’t works. Even defining drop function in a scope not works:
$scope.dropFunc = function(event, ui){
console.log('yep');
$scope.droppableOptions = {
drop: 'dropFunc',
...
}
Any solution?
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
jQuery Droppable, get the element dropped - Stack Overflow
From the drop event documentation: This event is triggered when an accepted draggable is dropped 'over' (within the tolerance of) this droppable.
Read more >ondrop Event - W3Schools
The ondrop event occurs when a draggable element or text selection is dropped on a valid drop target. Drag and drop is a...
Read more >Drag and Drop Overview - WPF .NET Framework
The drag source and drop target may be UI elements in the same application ... OLE drag-and-drop does not work while in the...
Read more >Drag'n'Drop with mouse events - The Modern JavaScript Tutorial
Use event delegation to track drag start: a single event handler on document for mousedown . If elements are dragged to top/bottom window...
Read more >File drag and drop - Web APIs | MDN
This example illustrates the use of both APIs (and does not use any ... The target element of the drop event needs an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@loverdrive did you find a solution for this. I am also doing the same thing. but on beforeDrop
$scope.beforeDropCallback = function(evt, ui){ var obj = ui.draggable.scope(); }
But ui.draggable.scope() returns undefined. Not sure what I am doing wrong
If I inspect the scope() function. It accepts two arguments. But none of the issue threads have mentioned it.
This callback
dosn’t found scope: Cannot read property ‘dndDragItem’ of undefined
also
gives me ‘undefined’
I need to have access to dropped element and dropzone, but i can’t understand how i can do it.
Thank you very much!