mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
working drag n drop
This commit is contained in:
parent
4e17e4d8ca
commit
b6f40043da
1 changed files with 28 additions and 0 deletions
|
@ -5276,6 +5276,34 @@ function Ace2Inner(){
|
|||
|
||||
bindTheEventHandlers();
|
||||
|
||||
var imageBeingDragged = null;
|
||||
|
||||
$(root)
|
||||
.bind('dragstart', function(event){
|
||||
imageBeingDragged = event.target;
|
||||
top.console.log('dragstart', event.target);
|
||||
})
|
||||
.bind('drop',function(event){
|
||||
top.console.log('drop', event.target);
|
||||
top.console.log('remove', imageBeingDragged);
|
||||
$(imageBeingDragged).html(" ");
|
||||
$(imageBeingDragged).parent().html(" ");
|
||||
imageBeingDragged = null;
|
||||
})
|
||||
.bind('dragend',function(event){
|
||||
// destroy original..
|
||||
top.console.log('dragend', event.target);
|
||||
$(imageBeingDragged).html(" ");
|
||||
$(imageBeingDragged).parent().html(" ");
|
||||
imageBeingDragged = null;
|
||||
});
|
||||
|
||||
/*
|
||||
$(root).on('mouseup', 'img', function(e){
|
||||
top.console.log("NEW WIDTH mouseup", e.target.width);
|
||||
top.console.log("All done");
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
hooks.callAll('aceInitialized', {
|
||||
|
|
Loading…
Reference in a new issue