From f22de35e1ef0624db31263188f764dce0111c352 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Fri, 15 Jun 2012 11:56:54 -0700 Subject: Timeline: Replace currentSelectedContainer with new model.domContainer. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 7 +++++-- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'js/panels/Timeline') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 734b051f..bb3ff170 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -702,6 +702,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // cache Timeline data in currentDocument. cacheTimeline: { value: function() { + if (typeof(this.application.ninja) === "undefined") { + return; + } // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. @@ -1397,10 +1400,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Ordinarily we could use this.getInsertionIndex BUT the new element // insertion and selection has already fired, so getInsertionIndex will return // incorrect info. So we need to look at the DOM. - var childrenLength = this.application.ninja.currentSelectedContainer.children.length, + var childrenLength = this.application.ninja.currentDocument.model.domContainer.children.length, newIndex = childrenLength -1; for (i = 0; i < childrenLength; i++) { - var currTest = this.application.ninja.currentSelectedContainer.children[i]; + var currTest = this.application.ninja.currentDocument.model.domContainer.children[i]; if (object == currTest) { myIndex = newIndex - i; } diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index a8ef0d6b..502c455b 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html @@ -19,7 +19,6 @@ "tween": {"@" : "tween"}, "mainCollapser" : {"@" : "mainCollapser"}, "positionCollapser" : {"@" : "positionCollapser"}, - "transformCollapser" : {"@" : "transformCollapser"}, "styleCollapser" : {"@" : "styleCollapser"} } }, -- cgit v1.2.3