aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
diff options
context:
space:
mode:
authorJonathan Duran2012-05-09 09:47:31 -0700
committerJonathan Duran2012-05-09 09:47:31 -0700
commit40670fd9a723fe6f95fe6c1ceefa0d2435b83aa4 (patch)
treefb4e4182a7745939678bd8e030c50ce0c4d5d087 /js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
parent7248949e27486992a03a26b636f22a5e476b1424 (diff)
downloadninja-40670fd9a723fe6f95fe6c1ceefa0d2435b83aa4.tar.gz
sub property additions
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js34
1 files changed, 21 insertions, 13 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 3c648642..8316540b 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -24,7 +24,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
24 24
25 draw:{ 25 draw:{
26 value:function(){ 26 value:function(){
27 27 console.log(this.trackType);
28 } 28 }
29 }, 29 },
30 30
@@ -105,18 +105,18 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
105 } 105 }
106 }, 106 },
107 107
108 _styleSelection:{ 108 _trackType:{
109 value:null 109 value:null
110 }, 110 },
111 111
112 styleSelection:{ 112 trackType:{
113 serializable:true, 113 serializable:true,
114 get:function () { 114 get:function () {
115 return this._styleSelection; 115 return this._trackType;
116 }, 116 },
117 set:function (value) { 117 set:function (value) {
118 if (value !== this._styleSelection) { 118 if (value !== this._trackType) {
119 this._styleSelection = value; 119 this._trackType = value;
120 } 120 }
121 } 121 }
122 }, 122 },
@@ -145,7 +145,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
145 145
146 this.styleIndex = this.propTrackData.styleIndex; 146 this.styleIndex = this.propTrackData.styleIndex;
147 this.propTweens = this.propTrackData.propTweens; 147 this.propTweens = this.propTrackData.propTweens;
148 this.styleSelection = this.propTrackData.styleSelection; 148 this.trackType = this.propTrackData.trackType;
149 this.needsDraw = true; 149 this.needsDraw = true;
150 } 150 }
151 }, 151 },
@@ -153,21 +153,29 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
153 handleClick:{ 153 handleClick:{
154 value:function(ev){ 154 value:function(ev){
155 if (ev.shiftKey) { 155 if (ev.shiftKey) {
156 console.log(this.trackType);
156 if (this.propTweens.length < 1) { 157 if (this.propTweens.length < 1) {
157 158
158 // check if there is an editor property assigned yet 159 // check if there is an editor property assigned yet
159 // get this property track's editor prop name from layer data arrays 160 // get this property track's editor prop name from layer data arrays
160 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 161 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
161 162
162 if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty == null) { 163 if (this.trackType === "style") {
163 console.log("Please enter a style property for this track before adding keyframes."); 164 if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty == null) {
164 return; 165 console.log("Please enter a style property for this track before adding keyframes.");
165 } else { 166 return;
166 this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty; 167 } else {
167 console.log("Property track editorProperty set to: " + this.trackEditorProperty); 168 this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty;
169 console.log("Property track editorProperty set to: " + this.trackEditorProperty);
170 }
171 } else if (this.trackType === "position") {
172 console.log("clicking on position track");
173
174 console.log(this.trackEditorProperty);
168 } 175 }
169 176
170 177
178
171 this.insertPropTween(0); 179 this.insertPropTween(0);
172 this.addPropAnimationRuleToElement(ev); 180 this.addPropAnimationRuleToElement(ev);
173 this.updatePropKeyframeRule(); 181 this.updatePropKeyframeRule();