aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html19
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js43
2 files changed, 49 insertions, 13 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 92adee05..77481ac0 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -101,6 +101,11 @@
101 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", 101 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed",
102 "oneway" : false 102 "oneway" : false
103 }, 103 },
104 "animateCollapser" : {
105 "boundObject" : {"@" : "repetition1"},
106 "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser",
107 "oneway" : false
108 },
104 "isSelected" : { 109 "isSelected" : {
105 "boundObject" : {"@" : "repetition1"}, 110 "boundObject" : {"@" : "repetition1"},
106 "boundObjectPropertyPath" : "objectAtCurrentIteration.isSelected", 111 "boundObjectPropertyPath" : "objectAtCurrentIteration.isSelected",
@@ -116,6 +121,11 @@
116 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", 121 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed",
117 "oneway" : false 122 "oneway" : false
118 }, 123 },
124 "animateCollapser" : {
125 "boundObject" : {"@" : "repetition1"},
126 "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser",
127 "oneway" : false
128 },
119 "dtextPositionX" : { 129 "dtextPositionX" : {
120 "boundObject" : {"@" : "repetition1"}, 130 "boundObject" : {"@" : "repetition1"},
121 "boundObjectPropertyPath" : "objectAtCurrentIteration.dtextPositionX", 131 "boundObjectPropertyPath" : "objectAtCurrentIteration.dtextPositionX",
@@ -164,7 +174,7 @@
164 "bindings": { 174 "bindings": {
165 "objects": { 175 "objects": {
166 "boundObject": {"@": "owner"}, 176 "boundObject": {"@": "owner"},
167 "boundObjectPropertyPath": "arrTracks", 177 "boundObjectPropertyPath": "arrLayers",
168 "oneway": false 178 "oneway": false
169 } 179 }
170 } 180 }
@@ -178,7 +188,7 @@
178 "bindings" : { 188 "bindings" : {
179 "trackID" : { 189 "trackID" : {
180 "boundObject" : {"@" : "repetition2"}, 190 "boundObject" : {"@" : "repetition2"},
181 "boundObjectPropertyPath" : "objectAtCurrentIteration.trackID", 191 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerID",
182 "oneway" : false 192 "oneway" : false
183 }, 193 },
184 "tweens" : { 194 "tweens" : {
@@ -231,6 +241,11 @@
231 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", 241 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed",
232 "oneway" : false 242 "oneway" : false
233 }, 243 },
244 "animateCollapser" : {
245 "boundObject" : {"@" : "repetition2"},
246 "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser",
247 "oneway" : false
248 },
234 "isStyleCollapsed" : { 249 "isStyleCollapsed" : {
235 "boundObject" : {"@" : "repetition2"}, 250 "boundObject" : {"@" : "repetition2"},
236 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", 251 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed",
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 59306705..49f044d7 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -47,11 +47,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
47 _cacheArrays : { 47 _cacheArrays : {
48 value: function() { 48 value: function() {
49 // Cache this.arrLayers and this.arrTracks. 49 // Cache this.arrLayers and this.arrTracks.
50 this.log('cacheArrays ' + this._boolCacheArrays) 50 //this.log('cacheArrays ' + this._boolCacheArrays)
51 if (this._boolCacheArrays) { 51 if (this._boolCacheArrays) {
52 this.log('caching arrays for ', this.application.ninja.currentDocument.name); 52 //this.log('caching arrays for ', this.application.ninja.currentDocument.name);
53 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; 53 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers;
54 this.application.ninja.currentDocument.tlArrTracks = this.arrTracks; 54 //this.application.ninja.currentDocument.tlArrTracks = this.arrTracks;
55 } 55 }
56 } 56 }
57 }, 57 },
@@ -530,6 +530,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
530 while (layerResult = this.returnedObject[hashIndex]) { 530 while (layerResult = this.returnedObject[hashIndex]) {
531 trackResult = this.returnedTrack[hashIndex]; 531 trackResult = this.returnedTrack[hashIndex];
532 if (layerResult.deleted !== true) { 532 if (layerResult.deleted !== true) {
533
534 // TODO: Help from Kruti
533 this.arrTracks.push(trackResult); 535 this.arrTracks.push(trackResult);
534 this.arrLayers.push(layerResult); 536 this.arrLayers.push(layerResult);
535 537
@@ -545,6 +547,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
545 while (dLayer[hashVariable]) { 547 while (dLayer[hashVariable]) {
546 if (dLayer[hashVariable]._layerID === event.detail._el._layerID) { 548 if (dLayer[hashVariable]._layerID === event.detail._el._layerID) {
547 dLayer[hashVariable].deleted = false; 549 dLayer[hashVariable].deleted = false;
550
551 // TODO: Help from Kruti
548 this.arrTracks.splice(event.detail._layerPosition, 0, event.detail._track); 552 this.arrTracks.splice(event.detail._layerPosition, 0, event.detail._track);
549 this.arrLayers.splice(event.detail._layerPosition, 0, event.detail._el); 553 this.arrLayers.splice(event.detail._layerPosition, 0, event.detail._el);
550 this.selectLayer(event.detail._layerPosition); 554 this.selectLayer(event.detail._layerPosition);
@@ -572,6 +576,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
572 while (dLayer[hashVariable]) { 576 while (dLayer[hashVariable]) {
573 if (dLayer[hashVariable]._layerID === event.detail._el._layerID) { 577 if (dLayer[hashVariable]._layerID === event.detail._el._layerID) {
574 dLayer[hashVariable].deleted = false; 578 dLayer[hashVariable].deleted = false;
579
580 // TODO: Help from Kruti
575 this.arrTracks.splice(event.detail._layerPosition, 0, event.detail._track); 581 this.arrTracks.splice(event.detail._layerPosition, 0, event.detail._track);
576 this.arrLayers.splice(event.detail._layerPosition, 0, event.detail._el); 582 this.arrLayers.splice(event.detail._layerPosition, 0, event.detail._el);
577 this.selectLayer(event.detail._layerPosition); 583 this.selectLayer(event.detail._layerPosition);
@@ -608,6 +614,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
608 thingToPush.deleted = false; 614 thingToPush.deleted = false;
609 thingToPush.isSelected = false; 615 thingToPush.isSelected = false;
610 thingToPush.created=false; 616 thingToPush.created=false;
617 thingToPush.isTrackAnimated = false;
618 thingToPush.currentKeyframeRule = null;
619 thingToPush.trackPosition = 0;
620 thingToPush.arrStyleTracks = [];
621 thingToPush.tweens = [];
611 if (_firstLayerDraw) { 622 if (_firstLayerDraw) {
612 623
613 this.application.ninja.currentSelectedContainer.uuid=this._hashKey; 624 this.application.ninja.currentSelectedContainer.uuid=this._hashKey;
@@ -619,7 +630,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
619 event.detail.ele.uuid =nj.generateRandom(); 630 event.detail.ele.uuid =nj.generateRandom();
620 thingToPush.elementsList.push(event.detail.ele); 631 thingToPush.elementsList.push(event.detail.ele);
621 } 632 }
622 633 /*
623 newTrack.trackID = this.currentLayerNumber; 634 newTrack.trackID = this.currentLayerNumber;
624 newTrack.isMainCollapsed = true; 635 newTrack.isMainCollapsed = true;
625 newTrack.isPositionCollapsed = true; 636 newTrack.isPositionCollapsed = true;
@@ -630,6 +641,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
630 newTrack.trackPosition = 0; 641 newTrack.trackPosition = 0;
631 newTrack.arrStyleTracks = []; 642 newTrack.arrStyleTracks = [];
632 newTrack.tweens = []; 643 newTrack.tweens = [];
644 */
633 645
634 if (_firstLayerDraw) { 646 if (_firstLayerDraw) {
635 if (this.application.ninja.currentSelectedContainer.id === "UserContent") { 647 if (this.application.ninja.currentSelectedContainer.id === "UserContent") {
@@ -643,18 +655,23 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
643 myIndex = this.layerRepetition.selectedIndexes[0]; 655 myIndex = this.layerRepetition.selectedIndexes[0];
644 thingToPush.layerPosition = myIndex; 656 thingToPush.layerPosition = myIndex;
645 thingToPush.isSelected = true; 657 thingToPush.isSelected = true;
646 newTrack.trackPosition = myIndex; 658 //newTrack.trackPosition = myIndex;
647 this.arrTracks.splice(myIndex, 0, newTrack); 659 thingToPush.trackPosition = myIndex;
660 //this.arrTracks.splice(myIndex, 0, newTrack);
648 this.arrLayers.splice(myIndex, 0, thingToPush); 661 this.arrLayers.splice(myIndex, 0, thingToPush);
649 this._LayerUndoPosition = myIndex; 662 this._LayerUndoPosition = myIndex;
650 this.selectLayer(myIndex); 663 this.selectLayer(myIndex);
651 this.hashLayerNumber.setItem(this._hashKey, thingToPush); 664 this.hashLayerNumber.setItem(this._hashKey, thingToPush);
652 this.hashInstance.setItem(this._hashKey, thingToPush, myIndex); 665 this.hashInstance.setItem(this._hashKey, thingToPush, myIndex);
666
667 // TODO: Help from Kruti
653 this.hashTrackInstance.setItem(this._hashKey, newTrack, myIndex); 668 this.hashTrackInstance.setItem(this._hashKey, newTrack, myIndex);
654 } else { 669 } else {
655 this.arrTracks.splice(0, 0, newTrack); 670 //this.arrTracks.splice(0, 0, newTrack);
656 this.arrLayers.splice(0, 0, thingToPush); 671 this.arrLayers.splice(0, 0, thingToPush);
657 thingToPush.layerPosition = this.arrLayers.length - 1; 672 thingToPush.layerPosition = this.arrLayers.length - 1;
673
674 // TODO: Help from Kruti
658 newTrack.trackPosition = this.arrTracks.length - 1; 675 newTrack.trackPosition = this.arrTracks.length - 1;
659 this._LayerUndoPosition = this.arrLayers.length - 1;