From 0b0ad28a216d839aab37b2563912bb82f79768d1 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 27 Jun 2012 12:08:54 -0700 Subject: Fix animation names breaking Signed-off-by: Jonathan Duran --- js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js') diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index 31ba8253..72d26e78 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js @@ -470,13 +470,18 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.parentComponent.animationNamesString; - var newAnimationNames = currentAnimationNameString + "," + this.animationName; + var newAnimationNames = ""; + if(currentAnimationNameString.length == 0){ + newAnimationNames = this.animationName; + } else { + newAnimationNames = currentAnimationNameString + "," + this.animationName; + } var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration"); var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration; var currentIterationCount = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-iteration-count"); var newIterationCount = currentIterationCount + ",1"; - this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames; + this.parentComponent.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames; this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); -- cgit v1.2.3