aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-03 13:35:37 -0700
committerValerio Virgillito2012-05-03 13:35:37 -0700
commit602240c38e0f2c3937d3c7246247e0b59bccab2b (patch)
tree6e4ed3fc6b3d6ab7aa0500b6b06f05744b8ddbb6 /js/controllers
parenta68c52ec84248cc1d8393d277edab6a4d3353c7e (diff)
downloadninja-602240c38e0f2c3937d3c7246247e0b59bccab2b.tar.gz
minor formatting
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/elements/element-controller.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index a7d99466..ea5fe4af 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -11,17 +11,16 @@ exports.ElementController = Montage.create(Component, {
11 11
12 addElement: { 12 addElement: {
13 value: function(el, styles) { 13 value: function(el, styles) {
14 if(this.application.ninja.timeline.currentLayerSelected){ 14 if(this.application.ninja.timeline.currentLayerSelected) {
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.documentRoot.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 23 } else {
24 }else{
25 this.application.ninja.currentDocument.documentRoot.appendChild(el); 24 this.application.ninja.currentDocument.documentRoot.appendChild(el);
26 } 25 }
27 // Nested elements - TODO make sure the CSS is correct before nesting elements 26 // Nested elements - TODO make sure the CSS is correct before nesting elements