diff options
author | Nivesh Rajbhandari | 2012-04-04 17:24:27 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-04 17:24:27 -0700 |
commit | 01cf259da7aaa7d70789d9a7c32111d88b477463 (patch) | |
tree | 0bff3395ac681e5f685d2267f7dbc03a8e32bc4a /js/mediators/drag-drop-mediator.js | |
parent | 331ea08655245e3532e48bf160d5f68a04d8723f (diff) | |
parent | 13368ca6ebbc13adeafccd898dfffd7ce37cb28a (diff) | |
download | ninja-01cf259da7aaa7d70789d9a7c32111d88b477463.tar.gz |
Merge branch 'refs/heads/ToolFixes' into WebGLMaterials
Conflicts:
js/document/templates/montage-html/default_html.css
js/mediators/element-mediator.js
js/panels/properties.reel/properties.js
js/tools/BrushTool.js
js/tools/LineTool.js
js/tools/PenTool.js
js/tools/SelectionTool.js
js/tools/ShapeTool.js
js/tools/TranslateObject3DTool.js
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/mediators/drag-drop-mediator.js')
-rwxr-xr-x | js/mediators/drag-drop-mediator.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js index 8663b06e..9d1b69a9 100755 --- a/js/mediators/drag-drop-mediator.js +++ b/js/mediators/drag-drop-mediator.js | |||
@@ -111,6 +111,7 @@ exports.DragDropMediator = Montage.create(Component, { | |||
111 | fileName = tempName; | 111 | fileName = tempName; |
112 | } | 112 | } |
113 | if (save && save.success && save.status === 201) { | 113 | if (save && save.success && save.status === 201) { |
114 | var self = this; | ||
114 | // | 115 | // |
115 | if (e.currentTarget.fileType.indexOf('svg') !== -1) { | 116 | if (e.currentTarget.fileType.indexOf('svg') !== -1) { |
116 | element = NJUtils.makeNJElement('embed', 'SVG', 'block');//TODO: Verify this is proper | 117 | element = NJUtils.makeNJElement('embed', 'SVG', 'block');//TODO: Verify this is proper |
@@ -121,9 +122,10 @@ exports.DragDropMediator = Montage.create(Component, { | |||
121 | element.src = url+'/'+fileName; | 122 | element.src = url+'/'+fileName; |
122 | } | 123 | } |
123 | //TODO: Remove temp fix for elements to redraw on drop | 124 | //TODO: Remove temp fix for elements to redraw on drop |
125 | |||
124 | element.onload = function () { | 126 | element.onload = function () { |
125 | NJevent("elementAdding", {el: element, data: rules}); | 127 | self.application.ninja.elementMediator.addElements(element, rules); |
126 | } | 128 | }; |
127 | // | 129 | // |
128 | rules = { | 130 | rules = { |
129 | 'position': 'absolute', | 131 | 'position': 'absolute', |
@@ -133,7 +135,7 @@ exports.DragDropMediator = Montage.create(Component, { | |||
133 | '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' | 135 | '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' |
134 | }; | 136 | }; |
135 | // | 137 | // |
136 | NJevent("elementAdding", {el: element, data: rules}); | 138 | self.application.ninja.elementMediator.addElements(element, rules); |
137 | } else { | 139 | } else { |
138 | //TODO: HANDLE ERROR ON SAVING FILE TO BE ADDED AS ELEMENT | 140 | //TODO: HANDLE ERROR ON SAVING FILE TO BE ADDED AS ELEMENT |
139 | } | 141 | } |