diff options
author | Jose Antonio Marquez | 2012-02-08 13:14:29 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-08 13:14:29 -0800 |
commit | 9b45b897949bf934c8bf2c90ee2ff78f8713cb12 (patch) | |
tree | e7c276a3934c823cab894f46ee7dc5d3eda9ca83 /js/mediators/drag-drop-mediator.js | |
parent | aa01c1210f3a4d9fd55a771b9de2c58ee3fa4bb6 (diff) | |
parent | 10cdeb52403f16d5d4be43a516e8cdfbc866a2a2 (diff) | |
download | ninja-9b45b897949bf934c8bf2c90ee2ff78f8713cb12.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into Color
Conflicts:
js/controllers/elements/shapes-controller.js
js/data/pi/pi-data.js
js/panels/properties/content.reel/content.js
Diffstat (limited to 'js/mediators/drag-drop-mediator.js')
-rw-r--r-- | js/mediators/drag-drop-mediator.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js index 07e4a50c..ede71383 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++) { |
@@ -125,7 +122,7 @@ exports.DragDropMediator = Montage.create(Component, { | |||
125 | 122 | ||
126 | NJUtils.makeElementModel(domElem, "SVG", "block"); | 123 | NJUtils.makeElementModel(domElem, "SVG", "block"); |
127 | } else { // treat as a regular image | 124 | } else { // treat as a regular image |
128 | domElem = NJUtils.makeNJElement("image", "Image", "block"); | 125 | domElem = NJUtils.makeNJElement("image", "image", "image"); |
129 | domElem.src = evt2.currentTarget.result; | 126 | domElem.src = evt2.currentTarget.result; |
130 | } | 127 | } |
131 | 128 | ||