aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js')
-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});