aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 925d4a9d..791239d7 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -188,14 +188,16 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
188 188
189 // check if there is an editor property assigned yet 189 // check if there is an editor property assigned yet
190 // get this property track's editor prop name from layer data arrays 190 // get this property track's editor prop name from layer data arrays
191 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 191 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID),
192 currentSelectedStyleIndex = this.getCurrentSelectedStyleIndex(selectIndex);
192 193
193 if (this.trackType == "style") { 194 if (this.trackType == "style") {
194 if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty == null) { 195 //console.log("PropertyTrack.handleClick; selectIndex = ", selectIndex, "; styleIndex = ", currentSelectedStyleIndex)
196 if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[currentSelectedStyleIndex].editorProperty == null) {
195 console.log("Please enter a style property for this track before adding keyframes."); 197 console.log("Please enter a style property for this track before adding keyframes.");
196 return; 198 return;
197 } else { 199 } else {
198 this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty; 200 this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[currentSelectedStyleIndex].editorProperty;
199 //console.log("Property track editorProperty set to: " + this.trackEditorProperty); 201 //console.log("Property track editorProperty set to: " + this.trackEditorProperty);
200 } 202 }
201 } else if (this.trackType == "position") { 203 } else if (this.trackType == "position") {
@@ -212,6 +214,21 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
212 } 214 }
213 } 215 }
214 }, 216 },
217
218 getCurrentSelectedStyleIndex: {
219 value: function(layerIndex) {
220 var returnVal = false,
221 i = 0,
222 arrLayerStylesLength = this.application.ninja.timeline.arrLayers[layerIndex].layerData.arrLayerStyles.length;
223 for (i = 0; i < arrLayerStylesLength; i++) {
224 var currItem = this.application.ninja.timeline.arrLayers[layerIndex].layerData.arrLayerStyles[i];
225 if (currItem.isSelected === true) {
226 returnVal = i;
227 }
228 }
229 return returnVal;
230 }
231 },
215 232
216 handleNewPropTween:{ 233 handleNewPropTween:{
217 value:function(ev){ 234 value:function(ev){