diff options
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/element-controller.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index a474961a..fcb121ee 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -18,10 +18,10 @@ exports.ElementController = Montage.create(Component, { | |||
18 | // Updated to use new methods in TimelinePanel. JR. | 18 | // Updated to use new methods in TimelinePanel. JR. |
19 | var insertionIndex = this.application.ninja.timeline.getInsertionIndex(); | 19 | var insertionIndex = this.application.ninja.timeline.getInsertionIndex(); |
20 | if (insertionIndex === false) { | 20 | if (insertionIndex === false) { |
21 | this.application.ninja.currentSelectedContainer.appendChild(el); | 21 | this.application.ninja.currentDocument.model.domContainer.appendChild(el); |
22 | } else { | 22 | } else { |
23 | if (insertionIndex === 0) { | 23 | if (insertionIndex === 0) { |
24 | this.application.ninja.currentSelectedContainer.appendChild(el); | 24 | this.application.ninja.currentDocument.model.domContainer.appendChild(el); |
25 | } else { | 25 | } else { |
26 | var element = this.application.ninja.timeline.arrLayers[insertionIndex].layerData.stageElement; | 26 | var element = this.application.ninja.timeline.arrLayers[insertionIndex].layerData.stageElement; |
27 | element.parentNode.insertBefore(el, element.nextSibling); | 27 | element.parentNode.insertBefore(el, element.nextSibling); |