aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index fbc3edd0..af58199a 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -344,27 +344,31 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
344 addPropAnimationRuleToElement:{ 344 addPropAnimationRuleToElement:{
345 value:function(tweenEvent){ 345 value:function(tweenEvent){
346 var currentStyleValue = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); 346 var currentStyleValue = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty);
347 if (currentStyleValue == null) {
348 currentStyleValue = "1px";
349 }
350 console.log(currentStyleValue);
351
347 this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue; 352 this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue;
348 353
354
349 this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; 355 this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty;
350 var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.animationNamesString; 356 var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.animationNamesString;
351 var newAnimationNames = currentAnimationNameString + "," + this.animationName; 357 var newAnimationNames = currentAnimationNameString + "," + this.animationName;
352 //var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration"); 358 var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration");
353 //var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration; 359 var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration;
354 //var currentIterationCount = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-iteration-count"); 360 var currentIterationCount = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-iteration-count");
355 //var newIterationCount = currentIterationCount + ",1"; 361 var newIterationCount = currentIterationCount + ",1";
356 362
357 this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames; 363 this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames;
358 364
359 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); 365 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames);
360 366
361 //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); 367 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration);
362 //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); 368 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount);
363 //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "both");
364 //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-transition-timing-function", "linear");
365 369
366 var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} 100% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} }"; 370 var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} 100% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} }";
367 //console.log(initRule); 371 console.log(initRule);
368 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); 372 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule);
369 373
370 this.insertPropTween(tweenEvent.offsetX); 374 this.insertPropTween(tweenEvent.offsetX);