From 13ebb58be961e92ba7c109298ef73daa7dea79c7 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 14 May 2012 23:08:24 -0700 Subject: fix keyframe bug when adding keyframes to sub properties Signed-off-by: Jonathan Duran --- js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | 4 ++-- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 2 +- js/panels/Timeline/Tween.reel/Tween.js | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index 03287df9..8d2c1918 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js @@ -291,12 +291,12 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); - this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); + //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "both"); //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-transition-timing-function", "linear"); var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} 100% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} }"; - console.log(initRule); + //console.log(initRule); this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); this.insertPropTween(tweenEvent.offsetX); diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 0e40e222..d8259281 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -603,8 +603,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.addAnimationRuleToElement(ev); this.updateKeyframeRule(); } else { - this.handleNewTween(ev); if (ev.target.className === "tracklane") { + this.handleNewTween(ev); this.updateKeyframeRule(); } } diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index bcd3d75f..846c2f1c 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -240,22 +240,18 @@ var Tween = exports.Tween = Montage.create(Component, { setStyleTweenProperty:{ value:function (eventDetail) { - console.log("Setting style tween properties for: " + this.parentComponent.parentComponent.trackEditorProperty); - console.log(eventDetail); + //console.log("Setting style tween properties for: " + this.parentComponent.parentComponent.trackEditorProperty); + //console.log(eventDetail); if(eventDetail.type == "setProperties"){ // ignore top, left, width, and height console.log(eventDetail.data.value[0]); this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; console.log(this.tweenedProperties); - } else if(eventDetail.type == "setColor"){ - console.log(eventDetail.data.value.color.css); var prop = this.parentComponent.parentComponent.trackEditorProperty; this.tweenedProperties[prop] = eventDetail.data.value.color.css; - console.log(this.tweenedProperties[prop]); this.parentComponent.parentComponent.updatePropKeyframeRule(); - } else if(eventDetail.type == "setProperty"){ // ignore top, left, width, and height console.log(eventDetail.data.value[0]); -- cgit v1.2.3