From 40670fd9a723fe6f95fe6c1ceefa0d2435b83aa4 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 9 May 2012 09:47:31 -0700 Subject: sub property additions Signed-off-by: Jonathan Duran --- .../Timeline/PropertyTrack.reel/PropertyTrack.js | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'js/panels/Timeline/PropertyTrack.reel') 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, { draw:{ value:function(){ - + console.log(this.trackType); } }, @@ -105,18 +105,18 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { } }, - _styleSelection:{ + _trackType:{ value:null }, - styleSelection:{ + trackType:{ serializable:true, get:function () { - return this._styleSelection; + return this._trackType; }, set:function (value) { - if (value !== this._styleSelection) { - this._styleSelection = value; + if (value !== this._trackType) { + this._trackType = value; } } }, @@ -145,7 +145,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { this.styleIndex = this.propTrackData.styleIndex; this.propTweens = this.propTrackData.propTweens; - this.styleSelection = this.propTrackData.styleSelection; + this.trackType = this.propTrackData.trackType; this.needsDraw = true; } }, @@ -153,21 +153,29 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { handleClick:{ value:function(ev){ if (ev.shiftKey) { + console.log(this.trackType); if (this.propTweens.length < 1) { // check if there is an editor property assigned yet // get this property track's editor prop name from layer data arrays var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); - if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty == null) { - console.log("Please enter a style property for this track before adding keyframes."); - return; - } else { - this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty; - console.log("Property track editorProperty set to: " + this.trackEditorProperty); + if (this.trackType === "style") { + if (this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty == null) { + console.log("Please enter a style property for this track before adding keyframes."); + return; + } else { + this.trackEditorProperty = this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty; + console.log("Property track editorProperty set to: " + this.trackEditorProperty); + } + } else if (this.trackType === "position") { + console.log("clicking on position track"); + + console.log(this.trackEditorProperty); } + this.insertPropTween(0); this.addPropAnimationRuleToElement(ev); this.updatePropKeyframeRule(); -- cgit v1.2.3