aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/PropertyTrack.reel
diff options
context:
space:
mode:
authorJonathan Duran2012-05-08 13:42:04 -0700
committerJonathan Duran2012-05-08 13:42:04 -0700
commit4f1693b953befabf4495df668f542c7f52270864 (patch)
treed7d87b0be39d47d55685b0cbc2ddc9db39abc7c7 /js/panels/Timeline/PropertyTrack.reel
parenta831e11ef6ae97bbd90c896b5cb6f4306e9001dd (diff)
downloadninja-4f1693b953befabf4495df668f542c7f52270864.tar.gz
Change sub property track arrays
Remove transform section and move width and height into Position section. rename position section Position and Size. additional support for generic prop tweens Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 54be3faf..3c648642 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -18,6 +18,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
18 this.element.addEventListener("click", this, false); 18 this.element.addEventListener("click", this, false);
19 this.trackID = this.parentComponent.parentComponent.parentComponent.trackID; 19 this.trackID = this.parentComponent.parentComponent.parentComponent.trackID;
20 this.animatedElement = this.parentComponent.parentComponent.parentComponent.animatedElement; 20 this.animatedElement = this.parentComponent.parentComponent.parentComponent.animatedElement;
21
21 } 22 }
22 }, 23 },
23 24
@@ -157,7 +158,15 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
157 // check if there is an editor property assigned yet 158 // check if there is an editor property assigned yet
158 // get this property track's editor prop name from layer data arrays 159 // get this property track's editor prop name from layer data arrays
159 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 160 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
160 console.log(this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty); 161
162 if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty == null) {
163 console.log("Please enter a style property for this track before adding keyframes.");
164 return;
165 } else {
166 this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty;
167 console.log("Property track editorProperty set to: " + this.trackEditorProperty);
168 }
169
161 170
162 this.insertPropTween(0); 171 this.insertPropTween(0);
163 this.addPropAnimationRuleToElement(ev); 172 this.addPropAnimationRuleToElement(ev);
@@ -223,6 +232,8 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
223 addPropAnimationRuleToElement:{ 232 addPropAnimationRuleToElement:{
224 value:function(tweenEvent){ 233 value:function(tweenEvent){
225 this.insertPropTween(tweenEvent.offsetX); 234 this.insertPropTween(tweenEvent.offsetX);
235 this.animationName = this.parentComponent.parentComponent.parentComponent.animationName;
236 console.log(this.animationName);
226 } 237 }
227 } 238 }
228}); 239});