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.js54
1 files changed, 52 insertions, 2 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 8f7745e5..83d4ce73 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -16,6 +16,8 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
16 prepareForDraw:{ 16 prepareForDraw:{
17 value:function(){ 17 value:function(){
18 this.element.addEventListener("click", this, false); 18 this.element.addEventListener("click", this, false);
19 this.trackID = this.parentComponent.parentComponent.parentComponent.trackID;
20 this.animatedElement = this.parentComponent.parentComponent.parentComponent.animatedElement;
19 } 21 }
20 }, 22 },
21 23
@@ -29,6 +31,10 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
29 value:null 31 value:null
30 }, 32 },
31 33
34 animatedElement:{
35 value:null
36 },
37
32 propTweenRepetition:{ 38 propTweenRepetition:{
33 serializable:true, 39 serializable:true,
34 get:function () { 40 get:function () {
@@ -53,10 +59,56 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
53 } 59 }
54 }, 60 },
55 61
62 _propTrackData:{
63 value:false
64 },
65
66 propTrackData:{
67 get:function () {
68 return this._propTrackData;
69 },
70 set:function (val) {
71 this._propTrackData = val;
72 if (this._propTrackData) {
73 this.setData();
74 }
75 }
76 },
77
78 setData:{
79 value:function(){
80 if (typeof(this.propTrackData) === "undefined") {
81 return;
82 }
83
84
85 this.propTweens = this.propTrackData.propTweens;
86
87 this.needsDraw = true;
88 }
89 },
90
56 nextKeyframe:{ 91 nextKeyframe:{
57 value:1 92 value:1
58 }, 93 },
59 94
95 _trackID:{
96 value:null
97 },
98
99 trackID:{
100 serializable:true,
101 get:function () {
102 return this._trackID;
103 },
104 set:function (value) {
105 if (value !== this._trackID) {
106 this._trackID = value;
107 this.propTrackData.layerID = value;
108 }
109 }
110 },
111
60 handleClick:{ 112 handleClick:{
61 value:function(ev){ 113 value:function(ev){
62 var parentTrackID = this.parentComponent.parentComponent.parentComponent.trackID; 114 var parentTrackID = this.parentComponent.parentComponent.parentComponent.trackID;
@@ -126,9 +178,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
126 178
127 addPropAnimationRuleToElement:{ 179 addPropAnimationRuleToElement:{
128 value:function(tweenEvent){ 180 value:function(tweenEvent){
129 console.log("SECOND PROP TWEEN ADDING at " + tweenEvent.offsetX);
130 this.insertPropTween(tweenEvent.offsetX); 181 this.insertPropTween(tweenEvent.offsetX);
131
132 } 182 }
133 } 183 }
134}); 184});