From 616ade06c8f669d18c27d27c3ee46a9c844a54ca Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 26 Jun 2012 08:12:33 -0700 Subject: Timeline Bug fixes Fix keyframe selection updating stage for sub props. Fix tween 0 for sub props on re-open. Fix repetition mismatch for styles and position tracks. Signed-off-by: Jonathan Duran --- .../Timeline/PropertyTrack.reel/PropertyTrack.js | 8 ++------ .../Timeline/TimelineTrack.reel/TimelineTrack.html | 21 +++++++++++---------- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 1 + js/panels/Timeline/Tween.reel/Tween.js | 4 +++- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index 66f39b5a..c18d6eff 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js @@ -16,8 +16,8 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { prepareForDraw:{ value:function(){ this.element.addEventListener("click", this, false); - this.trackID = this.parentComponent.parentComponent.parentComponent.trackID; - this.animatedElement = this.parentComponent.parentComponent.parentComponent.animatedElement; + this.trackID = this.parentComponent.parentComponent.parentComponent.parentComponent.trackID; + this.animatedElement = this.parentComponent.parentComponent.parentComponent.parentComponent.animatedElement; this.ninjaStylesContoller = this.application.ninja.stylesController; } }, @@ -465,11 +465,9 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { if (currentStyleValue == null) { currentStyleValue = "1px"; } - console.log(currentStyleValue); this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue; - this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.animationNamesString; var newAnimationNames = currentAnimationNameString + "," + this.animationName; @@ -486,9 +484,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} 100% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} }"; - console.log(initRule); this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); - this.insertPropTween(tweenEvent.offsetX); } } diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 79014ae6..658764c8 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html @@ -56,7 +56,7 @@ "styleTrackRepetition": { "prototype": "montage/ui/repetition.reel", "properties": { - "element": {"#": "content-styles"}, + "element": {"#": "content_style_tracks"}, "isSelectionEnabled" : false }, "bindings": { @@ -195,22 +195,23 @@
-
-
-
+
+ +
-
- -
-
-
+
+ +
+
+
+
+
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index dc1a5d99..7576b33f 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -969,6 +969,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { newTween.tweenData.tweenID = 0; newTween.tweenData.spanPosition = 0; this.tweens.push(newTween); + this.createMatchingPositionSizeTween(newTween); } else { tempTiming = trackTiming.split("s"); diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index c0949f93..682a8619 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -316,7 +316,9 @@ var Tween = exports.Tween = Montage.create(Component, { if(this.parentComponent.parentComponent.isSubproperty){ // set property specific style on element var currentValue = this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty]; - this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], this.parentComponent.parentComponent.trackEditorProperty, [currentValue], "Change", "tween"); + var el = this.parentComponent.parentComponent.animatedElement; + var prop = this.parentComponent.parentComponent.trackEditorProperty; + this.application.ninja.elementMediator.setProperty([el], prop, [currentValue], "Change", "tween"); } else { // move animated element to correct position on stage var currentTop = this.tweenedProperties["top"]; -- cgit v1.2.3