diff options
author | Jose Antonio Marquez | 2012-05-07 10:38:04 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-07 10:38:04 -0700 |
commit | 5293ede5f3493900df93da33197416d853f8d907 (patch) | |
tree | 3155deaea5616fa09fc96c84567419fec5f288a2 /js/mediators/drag-drop-mediator.js | |
parent | 9c0bda09a502472768f6dd5090a882d11be58d23 (diff) | |
parent | 30e837ade2da7cb20caf7c5a69faf0888736bb9a (diff) | |
download | ninja-5293ede5f3493900df93da33197416d853f8d907.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'js/mediators/drag-drop-mediator.js')
-rwxr-xr-x | js/mediators/drag-drop-mediator.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js index b0aba5b6..59086ef6 100755 --- a/js/mediators/drag-drop-mediator.js +++ b/js/mediators/drag-drop-mediator.js | |||
@@ -114,11 +114,13 @@ exports.DragDropMediator = Montage.create(Component, { | |||
114 | var self = this; | 114 | var self = this; |
115 | // | 115 | // |
116 | if (e.currentTarget.fileType.indexOf('svg') !== -1) { | 116 | if (e.currentTarget.fileType.indexOf('svg') !== -1) { |
117 | element = NJUtils.makeNJElement('embed', 'SVG', 'block');//TODO: Verify this is proper | 117 | element = NJUtils.make('embed', null, this.application.ninja.currentDocument);//TODO: Verify this is proper |
118 | NJUtils.createModelWithSelection(element, "SVG"); | ||
118 | element.type = 'image/svg+xml'; | 119 | element.type = 'image/svg+xml'; |
119 | element.src = url+'/'+fileName; | 120 | element.src = url+'/'+fileName; |
120 | } else { | 121 | } else { |
121 | element = NJUtils.makeNJElement('image', 'image', 'image'); | 122 | element = NJUtils.make('image', null, this.application.ninja.currentDocument); |
123 | NJUtils.createModel(element); | ||
122 | element.src = url+'/'+fileName; | 124 | element.src = url+'/'+fileName; |
123 | } | 125 | } |
124 | //Adding element once it is loaded | 126 | //Adding element once it is loaded |