From 08552f055117908beb469cf53a5d65803c603b49 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 5 Jun 2012 14:13:17 -0700 Subject: Fix error when opening file with no animations Signed-off-by: Jonathan Duran --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index ae6ff114..0bd4b674 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -739,19 +739,18 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.stageElement; if(this.animatedElement!==undefined){ this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); - - // check for multiple animation names - var animationNameList = this.animationName.split(","); - if(animationNameList.length > 1){ - this.animationNamesString = this.animationName; - this.animationName = animationNameList[0]; - this.getAllAnimationRules(animationNameList); - } else { - this.animationNamesString = this.animationName; - } - // build tweens for this tracks's keyframe rule if(this.animationName){ + // check for multiple animation names + var animationNameList = this.animationName.split(","); + if (animationNameList.length > 1) { + this.animationNamesString = this.animationName; + this.animationName = animationNameList[0]; + this.getAllAnimationRules(animationNameList); + } else { + this.animationNamesString = this.animationName; + } + trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); this.nextKeyframe = 0; -- cgit v1.2.3