aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel
diff options
context:
space:
mode:
authorJonathan Duran2012-05-15 00:47:52 -0700
committerJonathan Duran2012-05-15 00:47:52 -0700
commit847276c1e62d55c10d059683e7180635aa994890 (patch)
treec02fa05ff72bb68d05bbc5ebc70911a37fd97794 /js/panels/Timeline/TimelineTrack.reel
parent4438dae53bb528d94b9f21272f7c240dd546b0a8 (diff)
downloadninja-847276c1e62d55c10d059683e7180635aa994890.tar.gz
support width and height tween prop on re-opening saved doc
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index d8259281..8693e828 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -718,7 +718,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
718 718
719 retrieveStoredTweens:{ 719 retrieveStoredTweens:{
720 value:function () { 720 value:function () {
721 var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute; 721 var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute,widthOffsetAttribute,heightOffsetAttribute;
722 var currentMilliSec,currentMilliSecPerPixel,clickPosition,tempTiming,tempTimingFloat,trackTiming,i = 0; 722 var currentMilliSec,currentMilliSecPerPixel,clickPosition,tempTiming,tempTimingFloat,trackTiming,i = 0;
723 723
724 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 724 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
@@ -737,11 +737,16 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
737 newTween.tweenData = {}; 737 newTween.tweenData = {};
738 738
739 offsetAttribute = this.currentKeyframeRule[i].cssText.split(" "); 739 offsetAttribute = this.currentKeyframeRule[i].cssText.split(" ");
740
740 topOffSetAttribute = offsetAttribute[3].split("px"); 741 topOffSetAttribute = offsetAttribute[3].split("px");
741 leftOffsetAttribute = offsetAttribute[5].split("px"); 742 leftOffsetAttribute = offsetAttribute[5].split("px");
743 widthOffsetAttribute = offsetAttribute[7].split("px");
744 heightOffsetAttribute = offsetAttribute[9].split("px");
742 745
743 var tempTopOffset = parseInt(topOffSetAttribute[0]); 746 var tempTopOffset = parseInt(topOffSetAttribute[0]);
744 var tempLeftOffset =parseInt(leftOffsetAttribute[0]); 747 var tempLeftOffset = parseInt(leftOffsetAttribute[0]);
748 var tempWidthOffset = parseInt(widthOffsetAttribute[0]);
749 var tempHeightOffset = parseInt(heightOffsetAttribute[0]);
745 750
746 if (this.currentKeyframeRule[i].keyText === "0%") { 751 if (this.currentKeyframeRule[i].keyText === "0%") {
747 newTween.tweenData.spanWidth = 0; 752 newTween.tweenData.spanWidth = 0;
@@ -752,6 +757,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
752 newTween.tweenData.tweenedProperties = []; 757 newTween.tweenData.tweenedProperties = [];
753 newTween.tweenData.tweenedProperties["top"] = tempTopOffset; 758 newTween.tweenData.tweenedProperties["top"] = tempTopOffset;
754 newTween.tweenData.tweenedProperties["left"] = tempLeftOffset; 759 newTween.tweenData.tweenedProperties["left"] = tempLeftOffset;
760 newTween.tweenData.tweenedProperties["width"] = tempWidthOffset;
761 newTween.tweenData.tweenedProperties["height"] = tempHeightOffset;
755 this.tweens.push(newTween); 762 this.tweens.push(newTween);
756 } 763 }
757 else { 764 else {
@@ -772,6 +779,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
772 newTween.tweenData.tweenedProperties=[]; 779 newTween.tweenData.tweenedProperties=[];
773 newTween.tweenData.tweenedProperties["top"] = tempTopOffset; 780 newTween.tweenData.tweenedProperties["top"] = tempTopOffset;
774 newTween.tweenData.tweenedProperties["left"] = tempLeftOffset; 781 newTween.tweenData.tweenedProperties["left"] = tempLeftOffset;
782 newTween.tweenData.tweenedProperties["width"] = tempWidthOffset;
783 newTween.tweenData.tweenedProperties["height"] = tempHeightOffset;
775 this.tweens.push(newTween); 784 this.tweens.push(newTween);
776 } 785 }
777 this.nextKeyframe += 1; 786 this.nextKeyframe += 1;