From a065e1394e45bc7a58c861efd0912e60e8b37a03 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 15 May 2012 14:23:22 -0700 Subject: remove old method Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'js/panels/Timeline/Tween.reel/Tween.js') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 33fed17a..bb7ce735 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -147,7 +147,6 @@ var Tween = exports.Tween = Montage.create(Component, { }, - draw:{ value:function () { this.element.style.left = this.spanPosition + "px"; @@ -186,20 +185,14 @@ var Tween = exports.Tween = Montage.create(Component, { if (this.application.ninja.selectedElements[0] != this.parentComponent.parentComponent.animatedElement) { console.log("Wrong element selected for this keyframe track"); } else { - if (useAbsolute) { - this.setAbsoluteTweenProperties(event.detail); - } else { - this.setRelativeTweenProperties(event.detail); - } + this.setTweenProperties(event.detail); } } - - } } }, - setAbsoluteTweenProperties:{ + setTweenProperties:{ value:function (eventDetail) { if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; @@ -222,17 +215,10 @@ var Tween = exports.Tween = Montage.create(Component, { } }, - setRelativeTweenProperties:{ - value:function(eventDetail){ - //console.log(eventDetail); - } - }, - setStyleTweenProperty:{ value:function (eventDetail) { //console.log("Setting style tween properties for: " + this.parentComponent.parentComponent.trackEditorProperty); //console.log(eventDetail); - if(eventDetail.type == "setProperties"){ // need to ignore top, left, width, and height //console.log(eventDetail.data.value[0]); @@ -292,7 +278,6 @@ var Tween = exports.Tween = Montage.create(Component, { this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "width", [currentWidth], "Change", "tween"); this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "height", [currentHeight], "Change", "tween"); - } } }, @@ -301,10 +286,8 @@ var Tween = exports.Tween = Montage.create(Component, { value:function(){ // turn off event listener for element change this.eventManager.removeEventListener("elementChange", this, false); - // deselect the keyframe for this tween this.keyframe.deselectKeyframe(); } } - }); -- cgit v1.2.3 From e5830f3424c7db84f0e76b237616cbf59fe9ed1c Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 16 May 2012 08:58:03 -0700 Subject: Remove span highlighting and start syncing pos tracks and main track keyframes Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'js/panels/Timeline/Tween.reel/Tween.js') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index bb7ce735..f857ebd4 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -208,9 +208,6 @@ var Tween = exports.Tween = Montage.create(Component, { } // tell track to update css rule this.parentComponent.parentComponent.updateKeyframeRule(); - - // highlight the tween's span - this.tweenspan.highlightSpan(); this.isTweenAnimated = true; } }, -- cgit v1.2.3 From a5e3eb0cec55858cf911bffc429ce1de817a60ef Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 16 May 2012 11:20:13 -0700 Subject: methods for setting simple ease and splitting sub prop spans Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/panels/Timeline/Tween.reel/Tween.js') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index f857ebd4..b61b0ca9 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -239,6 +239,14 @@ var Tween = exports.Tween = Montage.create(Component, { } }, + setKeyframeEase:{ + value:function(easeType){ + // easeTypes - ease, ease-out, ease-in, ease-in-out, linear, cubic-bezier(x1, y1, x2, y2) + this.tweenedProperties["-webkit-animation-timing-function"] = easeType; + this.parentComponent.parentComponent.updatePropKeyframeRule(); + } + }, + selectTween:{ value: function(){ // turn on event listener for element change -- cgit v1.2.3 From 6f86dcc9df20727155f7507f4998baee38b8d01a Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 16 May 2012 14:02:58 -0700 Subject: Fix restore tween for main layer track with multiple animation names Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/Timeline/Tween.reel/Tween.js') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index b61b0ca9..de6a8d56 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -271,7 +271,7 @@ var Tween = exports.Tween = Montage.create(Component, { // 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"); - //console.log(currentValue); + console.log(currentValue); } else { // move animated element to correct position on stage var currentTop = this.tweenedProperties["top"] + "px"; -- cgit v1.2.3