From 6f86dcc9df20727155f7507f4998baee38b8d01a Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 16 May 2012 14:02:58 -0700 Subject: Fix restore tween for main layer track with multiple animation names Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 6 ++++++ js/panels/Timeline/Tween.reel/Tween.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index a38ecb30..8beb7b5d 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -730,7 +730,13 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; if(this.animatedElement!==undefined){ this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); + var animationNameList = this.animationName.split(","); + if(animationNameList.length > 1){ + this.animationName = animationNameList[0]; + } + this.animationNamesString = this.animationName; + if(this.animationName){ trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); this.nextKeyframe = 0; diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index b61b0ca9..de6a8d56 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -271,7 +271,7 @@ var Tween = exports.Tween = Montage.create(Component, { // 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"); - //console.log(currentValue); + console.log(currentValue); } else { // move animated element to correct position on stage var currentTop = this.tweenedProperties["top"] + "px"; -- cgit v1.2.3