Drag'n drop fix when dropping outside the list

This commit is contained in:
Vince 2012-09-07 23:25:38 +02:00
parent 6a0ba8acfe
commit 1c1e0398e7

View file

@ -51,7 +51,10 @@
ns.PreviewFilmController.prototype.onDrop_ = function( event, ui ) {
var frameId1 = parseInt($(event.srcElement).data("tile-number"), 10);
var frameId2 = parseInt($(event.target).data("tile-number"), 10);
if(isNaN(frameId1) || isNaN(frameId2)) {
return;
}
this.framesheet.swapFrames(frameId1, frameId2);
// TODO(vincz): deprecate