From 1c1e0398e740913fb047227fcbb590a0fb46720f Mon Sep 17 00:00:00 2001 From: Vince Date: Fri, 7 Sep 2012 23:25:38 +0200 Subject: [PATCH] Drag'n drop fix when dropping outside the list --- js/controller/PreviewFilmController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/controller/PreviewFilmController.js b/js/controller/PreviewFilmController.js index adbab71d..c08068ba 100644 --- a/js/controller/PreviewFilmController.js +++ b/js/controller/PreviewFilmController.js @@ -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