aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-28 15:15:12 -0800
committerJose Antonio Marquez2012-02-28 15:15:12 -0800
commitda83f44b0ecf379b0950a88d1c378fbedb80e386 (patch)
treec294662148907b6d496afee3dea1c03f18491680 /js/panels/Timeline/TimelineTrack.reel
parentb799b7cf3a422f407045c52a4c6a61756d1ea096 (diff)
parent676b4e2d7091ac63ce06f51be686b902b940bfff (diff)
downloadninja-da83f44b0ecf379b0950a88d1c378fbedb80e386.tar.gz
Merge branch 'refs/heads/integration-candidate' into FileIO-Build-Candidate
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html5
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js8
2 files changed, 10 insertions, 3 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
index 158d666e..26d045d6 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
@@ -62,6 +62,11 @@
62 "boundObject" : {"@": "tweenRepetition"}, 62 "boundObject" : {"@": "tweenRepetition"},
63 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTweenAnimated", 63 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTweenAnimated",
64 "oneway" : false 64 "oneway" : false
65 },
66 "isClearing" : {
67 "boundObject" : {"@": "tweenRepetition"},
68 "boundObjectPropertyPath" : "objectAtCurrentIteration.isClearing",
69 "oneway" : false
65 } 70 }
66 } 71 }
67 }, 72 },
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 55c84dce..43cd7477 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -377,7 +377,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
377 // This needs to move to a keyboard shortcut that is TBD 377 // This needs to move to a keyboard shortcut that is TBD
378 378
379 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 379 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
380 //this.application.ninja.timeline.selectLayer(selectIndex);
381 380
382 if (ev.shiftKey) { 381 if (ev.shiftKey) {
383 if (this.application.ninja.timeline.arrLayers[selectedIndex].elementsList.length == 1) { 382 if (this.application.ninja.timeline.arrLayers[selectedIndex].elementsList.length == 1) {
@@ -533,7 +532,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
533 this.tweens[0].tweenedProperties["top"] = this.animatedElement.offsetTop; 532 this.tweens[0].tweenedProperties["top"] = this.animatedElement.offsetTop;
534 this.tweens[0].tweenedProperties["left"] = this.animatedElement.offsetLeft; 533 this.tweens[0].tweenedProperties["left"] = this.animatedElement.offsetLeft;
535 var animationDuration = Math.round(this.trackDuration / 1000) + "s"; 534 var animationDuration = Math.round(this.trackDuration / 1000) + "s";
536 this.animationName = "animation_" + this.animatedElement.className; 535 this.animationName = "animation_" + this.animatedElement.classList[0];
537 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); 536 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName);
538 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); 537 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration);
539 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", "infinite"); 538 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", "infinite");
@@ -553,7 +552,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
553 var keyframeString = "@-webkit-keyframes " + this.animationName + " {"; 552 var keyframeString = "@-webkit-keyframes " + this.animationName + " {";
554 553
555 for (var i = 0; i < this.tweens.length; i++) { 554 for (var i = 0; i < this.tweens.length; i++) {
556 var keyframePercent = Math.round((this.tweens[i].keyFrameMillisec / this.trackDuration) * 100) + "%"; 555 var keyMill = parseInt(this.tweens[i].keyFrameMillisec);
556 // TODO - trackDur should be parseFloat rounded to significant digits
557 var trackDur = parseInt(this.trackDuration);
558 var keyframePercent = Math.round((keyMill / trackDur) * 100) + "%";
557 var keyframePropertyString = " " + keyframePercent + " {"; 559 var keyframePropertyString = " " + keyframePercent + " {";
558 keyframePropertyString += "top: " + this.tweens[i].tweenedProperties["top"] + "px;"; 560 keyframePropertyString += "top: " + this.tweens[i].tweenedProperties["top"] + "px;";
559 keyframePropertyString += " left: " + this.tweens[i].tweenedProperties["left"] + "px;"; 561 keyframePropertyString += " left: " + this.tweens[i].tweenedProperties["left"] + "px;";