diff options
author | Jonathan Duran | 2012-06-05 14:13:17 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-05 14:13:17 -0700 |
commit | 08552f055117908beb469cf53a5d65803c603b49 (patch) | |
tree | 5f52dd28bbe3cb5b6b48ad054534691e2d335bc1 /js/panels/Timeline | |
parent | 0aa4c5102bc27c90e61847fbdfeccf79b6ec6e47 (diff) | |
download | ninja-08552f055117908beb469cf53a5d65803c603b49.tar.gz |
Fix error when opening file with no animations
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 21 |
1 files changed, 10 insertions, 11 deletions
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, { | |||
739 | this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.stageElement; | 739 | this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.stageElement; |
740 | if(this.animatedElement!==undefined){ | 740 | if(this.animatedElement!==undefined){ |
741 | this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); | 741 | this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); |
742 | |||
743 | // check for multiple animation names | ||
744 | var animationNameList = this.animationName.split(","); | ||
745 | if(animationNameList.length > 1){ | ||
746 | this.animationNamesString = this.animationName; | ||
747 | this.animationName = animationNameList[0]; | ||
748 | this.getAllAnimationRules(animationNameList); | ||
749 | } else { | ||
750 | this.animationNamesString = this.animationName; | ||
751 | } | ||
752 | |||
753 | // build tweens for this tracks's keyframe rule | 742 | // build tweens for this tracks's keyframe rule |
754 | if(this.animationName){ | 743 | if(this.animationName){ |
744 | // check for multiple animation names | ||
745 | var animationNameList = this.animationName.split(","); | ||
746 | if (animationNameList.length > 1) { | ||
747 | this.animationNamesString = this.animationName; | ||
748 | this.animationName = animationNameList[0]; | ||
749 | this.getAllAnimationRules(animationNameList); | ||
750 | } else { | ||
751 | this.animationNamesString = this.animationName; | ||
752 | } | ||
753 | |||
755 | trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); | 754 | trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); |
756 | this.nextKeyframe = 0; | 755 | this.nextKeyframe = 0; |
757 | 756 | ||