From b7adc6f1ec09edcad523b1ddd32856ddf27c6724 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 15 May 2012 10:02:26 -0700 Subject: remove console logs. add retrieve tweens method for prop tracks Signed-off-by: Jonathan Duran --- js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | 17 ++++++++++++++++- js/panels/Timeline/Tween.reel/Tween.js | 11 ++++------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index 31e0b3b6..b3a31bf2 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js @@ -28,6 +28,21 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { } }, + didDraw:{ + value:function () { + if ((!this.application.ninja.documentController.creatingNewFile) || (!this.application.ninja.currentDocument.setLevel)) { + if (this.application.ninja.currentDocument.documentRoot.children[0]) { + var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); + if (selectedIndex !== false) { + if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { + //this.retrieveStoredStyleTweens(); + } + } + } + } + } + }, + trackEditorProperty:{ value:"" }, @@ -248,7 +263,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { retrieveStoredStyleTweens:{ value:function(){ - + console.log("retrieve style tweens"); } }, diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 30678beb..fb2ce4b4 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -234,8 +234,8 @@ var Tween = exports.Tween = Montage.create(Component, { //console.log(eventDetail); if(eventDetail.type == "setProperties"){ - // ignore top, left, width, and height - console.log(eventDetail.data.value[0]); + // need to ignore top, left, width, and height + //console.log(eventDetail.data.value[0]); this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; this.parentComponent.parentComponent.updatePropKeyframeRule(); @@ -245,8 +245,8 @@ var Tween = exports.Tween = Montage.create(Component, { this.parentComponent.parentComponent.updatePropKeyframeRule(); } else if(eventDetail.type == "setProperty"){ - // ignore top, left, width, and height - console.log(eventDetail.data.value[0]); + // need to ignore top, left, width, and height + //console.log(eventDetail.data.value[0]); this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; this.parentComponent.parentComponent.updatePropKeyframeRule(); @@ -279,9 +279,6 @@ var Tween = exports.Tween = Montage.create(Component, { if(this.parentComponent.parentComponent.isSubproperty){ // set property specific style on element var currentValue = this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty]; - - - this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], this.parentComponent.parentComponent.trackEditorProperty, [currentValue], "Change", "tween"); } else { -- cgit v1.2.3