aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
authorJonathan Duran2012-05-04 23:30:49 -0700
committerJonathan Duran2012-05-04 23:30:49 -0700
commita831e11ef6ae97bbd90c896b5cb6f4306e9001dd (patch)
treeab21360c204b94bcc736efcb99c9b203042c1580 /js/panels/Timeline
parent9f71f7804bd649dbfb9078cc0bef562530738e6f (diff)
downloadninja-a831e11ef6ae97bbd90c896b5cb6f4306e9001dd.tar.gz
more sub prop additions
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js34
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js3
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js2
3 files changed, 17 insertions, 22 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 9edd2b35..233e811f 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -51,6 +51,7 @@ var Layer = exports.Layer = Montage.create(Component, {
51 value: false 51 value: false
52 }, 52 },
53 styleRepetition : { 53 styleRepetition : {
54 serializable: true,
54 get: function() { 55 get: function() {
55 return this._styleRepetition; 56 return this._styleRepetition;
56 }, 57 },
@@ -61,8 +62,17 @@ var Layer = exports.Layer = Montage.create(Component, {
61 _styleCounter : { 62 _styleCounter : {
62 value: 0 63 value: 0
63 }, 64 },
65 styleCounter:{
66 serializable:true,
67 get:function () {
68 return this._styleCounter;
69 },
70 set:function (newVal) {
71 this._styleCounter = newVal;
72 }
73 },
64 74
65 /* Layer models: the name, ID, and selected and animation booleans for the layer */ 75 /* Layer models: the name, ID, and selected and animation booleans for the layer */
66 _layerName:{ 76 _layerName:{
67 value: "Default Layer Name" 77 value: "Default Layer Name"
68 }, 78 },
@@ -635,8 +645,8 @@ var Layer = exports.Layer = Montage.create(Component, {
635 newEvent.layerEventLocale = "styles"; 645 newEvent.layerEventLocale = "styles";
636 newEvent.layerEventType = "newStyle"; 646 newEvent.layerEventType = "newStyle";
637 newEvent.layerID = this.layerID; 647 newEvent.layerID = this.layerID;
638 newEvent.styleIndex = this._styleCounter; 648 newEvent.styleIndex = this.styleCounter;
639 newEvent.styleID = this.layerID + "@" + this._styleCounter; 649 newEvent.styleID = this.layerID + "@" + this.styleCounter;
640 650
641 newStyle.styleID = newEvent.styleID; 651 newStyle.styleID = newEvent.styleID;
642 newStyle.whichView = "hintable"; 652 newStyle.whichView = "hintable";
@@ -644,26 +654,12 @@ var Layer = exports.Layer = Montage.create(Component, {
644 newStyle.editorValue = ""; 654 newStyle.editorValue = "";
645 newStyle.ruleTweener = false; 655 newStyle.ruleTweener = false;
646 newStyle.isSelected = false; 656 newStyle.isSelected = false;
657 this.arrLayerStyles.push(newStyle);
647 658
648 if (!!this.styleRepetition.selectedIndexes) {
649 mySelection = this.styleRepetition.selectedIndexes[0];
650 this.arrLayerStyles.splice(mySelection, 0, newStyle);
651 //this.styleRepetition.selectedIndexes = [mySelection];
652 this.selectStyle(mySelection);
653 } else {
654 newLength = this.arrLayerStyles.length;
655 this.arrLayerStyles.push(newStyle);
656 mySelection = this.arrLayerStyles.length;
657 // this.styleRepetition.selectedIndexes = [mySelection-1];
658 this.selectStyle(mySelection-1);
659 }
660
661 // Set up the event info and dispatch the event 659 // Set up the event info and dispatch the event
662 this._styleCounter += 1; 660 this.styleCounter += 1;
663 newEvent.styleSelection = mySelection; 661 newEvent.styleSelection = mySelection;
664 defaultEventManager.dispatchEvent(newEvent); 662 defaultEventManager.dispatchEvent(newEvent);
665
666
667 } 663 }
668 }, 664 },
669 deleteStyle : { 665 deleteStyle : {
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index f2dbd683..54be3faf 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -157,8 +157,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
157 // check if there is an editor property assigned yet 157 // check if there is an editor property assigned yet
158 // get this property track's editor prop name from layer data arrays 158 // get this property track's editor prop name from layer data arrays
159 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 159 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
160 console.log(this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles); 160 console.log(this.application.ninja.timeline.arrLayers[selectIndex].layerData.arrLayerStyles[this.styleIndex].editorProperty);
161 console.log(this.styleIndex);
162 161
163 this.insertPropTween(0); 162 this.insertPropTween(0);
164 this.addPropAnimationRuleToElement(ev); 163 this.addPropAnimationRuleToElement(ev);
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 63f2f957..ddeb1449 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -819,7 +819,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
819 newStyleTrack.propTrackData.styleSelection = layerEvent.styleSelection; 819 newStyleTrack.propTrackData.styleSelection = layerEvent.styleSelection;
820 newStyleTrack.propTrackData.propTweens = []; 820 newStyleTrack.propTrackData.propTweens = [];
821 newStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; 821 newStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex;
822 console.log(layerEvent.styleSelection); 822
823 console.log(layerEvent.styleIndex); 823 console.log(layerEvent.styleIndex);
824 824
825 this.arrStyleTracks.push(newStyleTrack); 825 this.arrStyleTracks.push(newStyleTrack);