From e7286bcbd82c944ffe9705d87ff23b9ea29ea7e5 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Fri, 18 May 2012 15:22:20 -0700 Subject: Timeline: Bug fixes for deleting elements. --- js/controllers/elements/element-controller.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 925fc959..675176e9 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js @@ -13,22 +13,14 @@ exports.ElementController = Montage.create(Component, { value: function(el, styles) { // Updated to use new methods in TimelinePanel. JR. var insertionIndex = this.application.ninja.timeline.getInsertionIndex(); - console.log("elementcontroller.addElement, insertionIndex = ", insertionIndex); - //debugger; if (insertionIndex === false) { this.application.ninja.currentSelectedContainer.appendChild(el); } else { if (insertionIndex === 0) { this.application.ninja.currentSelectedContainer.appendChild(el); } else { - /* - if (insertionIndex === this.application.ninja.timeline.arrLayers.length-1) { - this.application.ninja.currentSelectedContainer.appendChild(el); - } else { - */ - var element = this.application.ninja.timeline.arrLayers[insertionIndex].layerData.stageElement; - element.parentNode.insertBefore(el, element.nextSibling); - //} + var element = this.application.ninja.timeline.arrLayers[insertionIndex].layerData.stageElement; + element.parentNode.insertBefore(el, element.nextSibling); } } -- cgit v1.2.3