aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/drag-drop-mediator.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators/drag-drop-mediator.js')
-rwxr-xr-xjs/mediators/drag-drop-mediator.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js
index c8e781a6..9d5dd256 100755
--- a/js/mediators/drag-drop-mediator.js
+++ b/js/mediators/drag-drop-mediator.js
@@ -105,6 +105,10 @@ exports.DragDropMediator = Montage.create(Component, {
105 element = NJUtils.makeNJElement('embed', 'SVG', 'block');//TODO: Verify this is proper 105 element = NJUtils.makeNJElement('embed', 'SVG', 'block');//TODO: Verify this is proper
106 element.src = url+'/'+fileName; 106 element.src = url+'/'+fileName;
107 element.type = 'image/svg+xml'; 107 element.type = 'image/svg+xml';
108 //TODO: Remove temp fix for SVG redraw on drop
109 element.onload = function () {
110 NJevent("elementAdding", {el: element, data: rules});
111 }
108 } else { 112 } else {
109 element = NJUtils.makeNJElement('image', 'image', 'image'); 113 element = NJUtils.makeNJElement('image', 'image', 'image');
110 element.src = url+'/'+fileName; 114 element.src = url+'/'+fileName;
@@ -114,9 +118,9 @@ exports.DragDropMediator = Montage.create(Component, {
114 'position': 'absolute', 118 'position': 'absolute',
115 'top' : (parseInt(e.currentTarget.filePosition.y) - parseInt(this.application.ninja.stage.userContentTop)) + 'px', 119 'top' : (parseInt(e.currentTarget.filePosition.y) - parseInt(this.application.ninja.stage.userContentTop)) + 'px',
116 'left' : (parseInt(e.currentTarget.filePosition.x) - parseInt(this.application.ninja.stage.userContentLeft)) + 'px' 120 'left' : (parseInt(e.currentTarget.filePosition.x) - parseInt(this.application.ninja.stage.userContentLeft)) + 'px'
117 }; 121 };
118 // 122 //
119 NJevent("elementAdding", {el: element, data: rules}); 123 NJevent("elementAdding", {el: element, data: rules});
120 } else { 124 } else {
121 //TODO: HANDLE ERROR ON SAVING FILE TO BE ADDED AS ELEMENT 125 //TODO: HANDLE ERROR ON SAVING FILE TO BE ADDED AS ELEMENT
122 } 126 }