diff options
author | Pushkar Joshi | 2012-02-08 15:42:40 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-02-08 15:42:40 -0800 |
commit | 18243deb66ab14a014756bfb0be1a52648c7771a (patch) | |
tree | c64660f7f69840cac5186fd730221335bd0a67af /js/mediators | |
parent | 802e92eb70b00849dadacf2c6590d27edbe65d99 (diff) | |
parent | 0537f8f29e7b8dd48fd08f20b1533fbe92a54c4b (diff) | |
download | ninja-18243deb66ab14a014756bfb0be1a52648c7771a.tar.gz |
Merge branch 'master' into pentool
Conflicts:
js/helper-classes/RDGE/GLWorld.js
js/helper-classes/RDGE/MaterialsLibrary.js
Diffstat (limited to 'js/mediators')
-rw-r--r-- | js/mediators/drag-drop-mediator.js | 2 | ||||
-rw-r--r-- | js/mediators/element-mediator.js | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/js/mediators/drag-drop-mediator.js b/js/mediators/drag-drop-mediator.js index aacb228c..ede71383 100644 --- a/js/mediators/drag-drop-mediator.js +++ b/js/mediators/drag-drop-mediator.js | |||
@@ -122,7 +122,7 @@ exports.DragDropMediator = Montage.create(Component, { | |||
122 | 122 | ||
123 | NJUtils.makeElementModel(domElem, "SVG", "block"); | 123 | NJUtils.makeElementModel(domElem, "SVG", "block"); |
124 | } else { // treat as a regular image | 124 | } else { // treat as a regular image |
125 | domElem = NJUtils.makeNJElement("image", "Image", "block"); | 125 | domElem = NJUtils.makeNJElement("image", "image", "image"); |
126 | domElem.src = evt2.currentTarget.result; | 126 | domElem.src = evt2.currentTarget.result; |
127 | } | 127 | } |
128 | 128 | ||
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index c44e1cb5..9aefbca6 100644 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -112,6 +112,13 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
112 | } | 112 | } |
113 | }, | 113 | }, |
114 | 114 | ||
115 | replaceElement: { | ||
116 | value: function(el, el2) { | ||
117 | el2.elementModel = el.elementModel; | ||
118 | this.application.ninja.currentDocument.documentRoot.replaceChild(el2, el); | ||
119 | } | ||
120 | }, | ||
121 | |||
115 | getNJProperty: { | 122 | getNJProperty: { |
116 | value: function(el, p) { | 123 | value: function(el, p) { |
117 | if(el.elementModel) { | 124 | if(el.elementModel) { |