aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators')
-rw-r--r--js/mediators/drag-drop-mediator.js9
-rw-r--r--js/mediators/element-mediator.js4
2 files changed, 5 insertions, 8 deletions
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, {
62 62
63 handleDropEvent: { 63 handleDropEvent: {
64 value: function(evt){ 64 value: function(evt){
65 var xferString, component; 65 var xferString, component, file, files, idx, len;
66 66
67 this.baseX = evt.offsetX - this.application.ninja.stage.userContentLeft; 67 this.baseX = evt.offsetX - this.application.ninja.stage.userContentLeft;
68 this.baseY = evt.offsetY - this.application.ninja.stage.userContentTop; 68 this.baseY = evt.offsetY - this.application.ninja.stage.userContentTop;
@@ -85,11 +85,8 @@ exports.DragDropMediator = Montage.create(Component, {
85 return; 85 return;
86 } 86 }
87 87
88 var file; 88 files = evt.dataTransfer.files;
89 const files = evt.dataTransfer.files; 89 len = files.length;
90 var idx;
91 const len = files.length;
92
93 90
94 // Loop over all dragged files... 91 // Loop over all dragged files...
95 for (idx = 0; idx < len; idx++) { 92 for (idx = 0; idx < len; idx++) {
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 992ac620..c44e1cb5 100644
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -48,10 +48,10 @@ exports.ElementMediator = Montage.create(NJComponent, {
48 len = this.application.ninja.selectedElements.length; 48 len = this.application.ninja.selectedElements.length;
49 49
50 if(len) { 50 if(len) {
51 for(var i = 0; i<len; i++) 51 for(var i = 0; i<len; i++) {
52 {
53 els.push(this.application.ninja.selectedElements[i]); 52 els.push(this.application.ninja.selectedElements[i]);
54 } 53 }
54
55 for(i=0; i<len; i++) { 55 for(i=0; i<len; i++) {
56 this._removeElement(els[i]._element); 56 this._removeElement(els[i]._element);
57 } 57 }