From 52b58508dfa20c996ddbcdda80f62154ed0a36c7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 3 Feb 2012 23:50:16 -0800 Subject: IKNINJA-854 - removed cons and replaced it with var Signed-off-by: Valerio Virgillito --- js/mediators/drag-drop-mediator.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'js/mediators/drag-drop-mediator.js') diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js index 07e4a50c..aacb228c 100644 --- a/js/mediators/drag-drop-mediator.js +++ b/js/mediators/drag-drop-mediator.js @@ -62,7 +62,7 @@ exports.DragDropMediator = Montage.create(Component, { handleDropEvent: { value: function(evt){ - var xferString, component; + var xferString, component, file, files, idx, len; this.baseX = evt.offsetX - this.application.ninja.stage.userContentLeft; this.baseY = evt.offsetY - this.application.ninja.stage.userContentTop; @@ -85,11 +85,8 @@ exports.DragDropMediator = Montage.create(Component, { return; } - var file; - const files = evt.dataTransfer.files; - var idx; - const len = files.length; - + files = evt.dataTransfer.files; + len = files.length; // Loop over all dragged files... for (idx = 0; idx < len; idx++) { -- cgit v1.2.3