aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js15
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js13
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js5
3 files changed, 26 insertions, 7 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 43370a64..31e0b3b6 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -246,6 +246,12 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
246 } 246 }
247 }, 247 },
248 248
249 retrieveStoredStyleTweens:{
250 value:function(){
251
252 }
253 },
254
249 updatePropKeyframeRule:{ 255 updatePropKeyframeRule:{
250 value:function(){ 256 value:function(){
251 // delete the current rule 257 // delete the current rule
@@ -278,14 +284,13 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
278 var currentStyleValue = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); 284 var currentStyleValue = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty);
279 this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue; 285 this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue;
280 286
281
282 this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; 287 this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty;
283 var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.animationNamesString; 288 var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.animationNamesString;
284 var newAnimationNames = currentAnimationNameString + "," + this.animationName; 289 var newAnimationNames = currentAnimationNameString + "," + this.animationName;
285 var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration"); 290 //var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration");
286 var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration; 291 //var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration;
287 var currentIterationCount = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-iteration-count"); 292 //var currentIterationCount = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-iteration-count");
288 var newIterationCount = currentIterationCount + ",1"; 293 //var newIterationCount = currentIterationCount + ",1";
289 294
290 this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames; 295 this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames;
291 296
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;
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js
index 63dabefe..3c0223c1 100644
--- a/js/panels/Timeline/Tween.reel/Tween.js
+++ b/js/panels/Timeline/Tween.reel/Tween.js
@@ -282,9 +282,14 @@ var Tween = exports.Tween = Montage.create(Component, {
282 // move animated element to correct position on stage 282 // move animated element to correct position on stage
283 var currentTop = this.tweenedProperties["top"] + "px"; 283 var currentTop = this.tweenedProperties["top"] + "px";
284 var currentLeft = this.tweenedProperties["left"] + "px"; 284 var currentLeft = this.tweenedProperties["left"] + "px";
285 var currentWidth = this.tweenedProperties["width"] + "px";
286 var currentHeight = this.tweenedProperties["height"] + "px";
285 287
286 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); 288 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween");
287 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); 289 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween");
290 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "width", [currentWidth], "Change", "tween");
291 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "height", [currentHeight], "Change", "tween");
292
288 } 293 }
289 } 294 }
290 }, 295 },