aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/PropertyTrack.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js10
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js.orig561
2 files changed, 562 insertions, 9 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 752340bb..de2e5bb5 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -311,7 +311,6 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
311 311
312 splitTweenIndex = i + 1; 312 splitTweenIndex = i + 1;
313 313
314 // Update the next tween to have new span position and width.
315 this.propTweens[i + 1].tweenData.spanPosition = position; 314 this.propTweens[i + 1].tweenData.spanPosition = position;
316 this.propTweens[i + 1].spanPosition = position; 315 this.propTweens[i + 1].spanPosition = position;
317 this.propTweens[i + 1].tweenData.spanWidth = this.propTweens[i + 1].tweenData.keyFramePosition - position; 316 this.propTweens[i + 1].tweenData.spanWidth = this.propTweens[i + 1].tweenData.keyFramePosition - position;
@@ -324,7 +323,6 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
324 } 323 }
325 this.propTweenRepetition.childComponents[nextComponentIndex].setData(); 324 this.propTweenRepetition.childComponents[nextComponentIndex].setData();
326 325
327 // Create the new tween and splice it into the model
328 var newTweenToInsert = {}; 326 var newTweenToInsert = {};
329 newTweenToInsert.tweenData = {}; 327 newTweenToInsert.tweenData = {};
330 newTweenToInsert.tweenData.spanWidth = position - prevTween; 328 newTweenToInsert.tweenData.spanWidth = position - prevTween;
@@ -339,9 +337,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
339 i = tweensLength; 337 i = tweensLength;
340 } 338 }
341 } 339 }
342
343 this.application.ninja.currentDocument.model.needsSave = true; 340 this.application.ninja.currentDocument.model.needsSave = true;
344
345 for (i = 0; i <= tweensLength + 1; i++) { 341 for (i = 0; i <= tweensLength + 1; i++) {
346 this.propTweens[i].tweenID = i; 342 this.propTweens[i].tweenID = i;
347 this.propTweens[i].tweenData.tweenID = i; 343 this.propTweens[i].tweenData.tweenID = i;
@@ -418,8 +414,6 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
418 414
419 updatePropKeyframeRule:{ 415 updatePropKeyframeRule:{
420 value:function(){ 416 value:function(){
421 var keyframeString, keyMill, trackDur, keyframePercent, keyframePropertyString, prop, i;
422 // delete the current rule
423 this.ninjaStylesContoller.deleteRule(this.currentKeyframeRule); 417 this.ninjaStylesContoller.deleteRule(this.currentKeyframeRule);
424 418
425 // build the new keyframe string 419 // build the new keyframe string
@@ -438,7 +432,6 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
438 keyframeString += keyframePropertyString; 432 keyframeString += keyframePropertyString;
439 } 433 }
440 keyframeString += " }"; 434 keyframeString += " }";
441 // set the keyframe string as the new rule
442 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString); 435 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString);
443 this.application.ninja.currentDocument.model.needsSave = true; 436 this.application.ninja.currentDocument.model.needsSave = true;
444 } 437 }
@@ -453,9 +446,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
453 if (currentStyleValue == null) { 446 if (currentStyleValue == null) {
454 currentStyleValue = "1px"; 447 currentStyleValue = "1px";
455 } 448 }
456
457 this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue; 449 this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue;
458
459 this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; 450 this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty;
460 currentAnimationNameString = this.timelineTrack.animationNamesString; 451 currentAnimationNameString = this.timelineTrack.animationNamesString;
461 newAnimationNames = ""; 452 newAnimationNames = "";
@@ -481,4 +472,5 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
481 this.insertPropTween(tweenEvent.offsetX); 472 this.insertPropTween(tweenEvent.offsetX);
482 } 473 }
483 } 474 }
475 /* ===- End Controllers ==== */
484}); 476});
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js.orig b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js.orig
new file mode 100644
index 00000000..e2e52a3b
--- /dev/null
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js.orig
@@ -0,0 +1,561 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9
10var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
11
12 /* ===- Begin Models ==== */
13 hasTemplate:{
14 value: true
15 },
16
17<<<<<<< HEAD
18=======
19 trackEditorProperty:{
20 value:""
21 },
22
23 animatedElement:{
24 value:null
25 },
26
27 isSubproperty:{
28 value:true
29 },
30
31>>>>>>> refs/heads/TimelineUberJD
32 _propTweenRepetition:{
33 value:null
34 },
35 propTweenRepetition:{
36 get:function () {
37 return this._propTweenRepetition;
38 },
39 set:function (newVal) {
40 this._propTweenRepetition = newVal;
41 }
42 },
43
44 _propTweens:{
45 value:[]
46 },
47 propTweens:{
48 serializable:true,
49 get:function () {
50 return this._propTweens;
51 },
52 set:function (newVal) {
53 this._propTweens = newVal;
54 }
55 },
56
57 _propTrackData:{
58 value:false
59 },
60 propTrackData:{
61 serializable:true,
62 get:function () {
63 return this._propTrackData;
64 },
65 set:function (val) {
66 this._propTrackData = val;
67 if (this._propTrackData) {
68 this.setData();
69 }
70 }
71 },
72 _trackID:{
73 value:null
74 },
75 trackID:{
76 serializable:true,
77 get:function () {
78 return this._trackID;
79 },
80 set:function (value) {
81 if (value !== this._trackID) {
82 this._trackID = value;
83 }
84 }
85 },
86
87 _trackType:{
88 value:null
89 },
90 trackType:{
91 serializable:true,
92 get:function () {
93 return this._trackType;
94 },
95 set:function (value) {
96 if (value !== this._trackType) {
97 this._trackType = value;
98 }
99 }
100 },
101
102 _styleIndex:{
103 value:null
104 },
105 styleIndex:{
106 serializable:true,
107 get:function () {
108 return this._styleIndex;
109 },
110 set:function (value) {
111 if (value !== this._styleIndex) {
112 this._styleIndex = value;
113 }
114 }
115 },
116
117 trackEditorProperty:{
118 value:""
119 },
120
121 animatedElement:{
122 value:null
123 },
124
125 isSubproperty:{
126 value:true
127 },
128
129 nextKeyframe:{
130 value:1
131 },
132