Closed jet10000 closed 3 years ago
This is not working for me too. However If I do not make an Ajax call I am able to cancel the drop, using drake.cancel(true);
If one makes a synchronous Ajax call, the drake.cancel(true) works. (But this is a bad idea.) e.g.
drake.on('drop', function (el, target) {
var data = {"Id":el.id, "Target":target.id};
$.ajax({
async: false, // <--- BAD but works...
url: '/moveto/,
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: JSON.stringify(data)
}).done(function(result) {
drake.cancel(true);
});
drake.cancel(true) NOT WORK.