aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJonathan Duran2012-05-15 11:27:51 -0700
committerJonathan Duran2012-05-15 11:27:51 -0700
commite9995c973acadc507b802fdefdb22b4c4bf82325 (patch)
tree1d480c578245273c3f5c809aa8a37b2cf5d947ea /js
parentb7adc6f1ec09edcad523b1ddd32856ddf27c6724 (diff)
downloadninja-e9995c973acadc507b802fdefdb22b4c4bf82325.tar.gz
fix keyframe splitting
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js9
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js4
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js2
3 files changed, 12 insertions, 3 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index b3a31bf2..f2004b94 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -201,7 +201,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
201 //console.log("Property track editorProperty set to: " + this.trackEditorProperty); 201 //console.log("Property track editorProperty set to: " + this.trackEditorProperty);
202 } 202 }
203 } else if (this.trackType === "position") { 203 } else if (this.trackType === "position") {
204 console.log("Property track editorProperty set to: " + this.trackEditorProperty); 204 //console.log("Property track editorProperty set to: " + this.trackEditorProperty);
205 } 205 }
206 206
207 this.insertPropTween(0); 207 this.insertPropTween(0);
@@ -217,7 +217,12 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
217 217
218 handleNewPropTween:{ 218 handleNewPropTween:{
219 value:function(ev){ 219 value:function(ev){
220 this.insertPropTween(ev.offsetX); 220 if (ev.offsetX > this.propTweens[this.propTweens.length - 1].tweenData.keyFramePosition) {
221 this.insertPropTween(ev.offsetX);
222 } else {
223 console.log("spitting sub keyframes not yet supported");
224 }
225
221 } 226 }
222 }, 227 },
223 228
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index b55db18a..a38ecb30 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -603,9 +603,13 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
603 this.addAnimationRuleToElement(ev); 603 this.addAnimationRuleToElement(ev);
604 this.updateKeyframeRule(); 604 this.updateKeyframeRule();
605 } else { 605 } else {
606 //console.log(ev);
606 if (ev.target.className === "tracklane") { 607 if (ev.target.className === "tracklane") {
607 this.handleNewTween(ev); 608 this.handleNewTween(ev);
608 this.updateKeyframeRule(); 609 this.updateKeyframeRule();
610 } else if (ev.target.className === "tween_span" && ev.target.parentElement.parentElement.className === "tracklane"){
611 this.handleNewTween(ev);
612 this.updateKeyframeRule();
609 } 613 }
610 } 614 }
611 } else { 615 } else {
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js
index fb2ce4b4..33fed17a 100644
--- a/js/panels/Timeline/Tween.reel/Tween.js
+++ b/js/panels/Timeline/Tween.reel/Tween.js
@@ -280,7 +280,7 @@ var Tween = exports.Tween = Montage.create(Component, {
280 // set property specific style on element 280 // set property specific style on element
281 var currentValue = this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty]; 281 var currentValue = this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty];
282 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], this.parentComponent.parentComponent.trackEditorProperty, [currentValue], "Change", "tween"); 282 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], this.parentComponent.parentComponent.trackEditorProperty, [currentValue], "Change", "tween");
283 283 //console.log(currentValue);
284 } else { 284 } else {
285 // move animated element to correct position on stage 285 // move animated element to correct position on stage
286 var currentTop = this.tweenedProperties["top"] + "px"; 286 var currentTop = this.tweenedProperties["top"] + "px";