aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/element-controller.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-03 23:08:31 -0700
committerValerio Virgillito2012-05-03 23:08:31 -0700
commit3542dab96689a54f97fff6fc654838c07c724517 (patch)
tree1c8a8a53985bb72a34ad302e402ffe24aec2f242 /js/controllers/elements/element-controller.js
parent24b483db367291b72170f969de78efcb1a9b95bd (diff)
parent60388a7d01d9e34b5cd15bd5cb190a610e4f9a0e (diff)
downloadninja-3542dab96689a54f97fff6fc654838c07c724517.tar.gz
Merge branch 'tag-2.0' of github.com:mencio/ninja-internal into data-id
Conflicts: js/components/tools-properties/tag-properties.reel/tag-properties.html Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rwxr-xr-xjs/controllers/elements/element-controller.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index ea5fe4af..45d78b33 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -15,16 +15,15 @@ exports.ElementController = Montage.create(Component, {
15 var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID); 15 var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID);
16 16
17 if(selectedLayerIndex === 0) { 17 if(selectedLayerIndex === 0) {
18 this.application.ninja.currentDocument.documentRoot.appendChild(el); 18 this.application.ninja.currentDocument.currentSelectedContainer.appendChild(el);
19 } else { 19 } else {
20 var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0]; 20 var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0];
21 element.parentNode.insertBefore(el, element.nextSibling); 21 element.parentNode.insertBefore(el, element.nextSibling);
22 } 22 }
23 } else { 23 } else {
24 this.application.ninja.currentDocument.documentRoot.appendChild(el); 24 this.application.ninja.currentDocument.currentSelectedContainer.appendChild(el);
25 } 25 }
26 // Nested elements - TODO make sure the CSS is correct before nesting elements 26
27 // this.application.ninja.currentSelectedContainer.appendChild(el);
28 if(styles) { 27 if(styles) {
29 this.application.ninja.stylesController.setElementStyles(el, styles); 28 this.application.ninja.stylesController.setElementStyles(el, styles);
30 } 29 }