From 602240c38e0f2c3937d3c7246247e0b59bccab2b Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 3 May 2012 13:35:37 -0700 Subject: minor formatting Signed-off-by: Valerio Virgillito --- js/controllers/elements/element-controller.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'js/controllers/elements') 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, { addElement: { value: function(el, styles) { - if(this.application.ninja.timeline.currentLayerSelected){ + if(this.application.ninja.timeline.currentLayerSelected) { var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID); - if(selectedLayerIndex==0){ + if(selectedLayerIndex === 0) { this.application.ninja.currentDocument.documentRoot.appendChild(el); - }else{ - var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0]; - element.parentNode.insertBefore(el,element.nextSibling); + } else { + var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0]; + element.parentNode.insertBefore(el, element.nextSibling); } - - }else{ + } else { this.application.ninja.currentDocument.documentRoot.appendChild(el); } // Nested elements - TODO make sure the CSS is correct before nesting elements -- cgit v1.2.3