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.html14
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js560
2 files changed, 275 insertions, 299 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 92adee05..ae1bcddf 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -116,6 +116,11 @@
116 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", 116 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed",
117 "oneway" : false 117 "oneway" : false
118 }, 118 },
119 "bypassAnimation" : {
120 "boundObject" : {"@" : "repetition1"},
121 "boundObjectPropertyPath" : "objectAtCurrentIteration.bypassAnimation",
122 "oneway" : false
123 },
119 "dtextPositionX" : { 124 "dtextPositionX" : {
120 "boundObject" : {"@" : "repetition1"}, 125 "boundObject" : {"@" : "repetition1"},
121 "boundObjectPropertyPath" : "objectAtCurrentIteration.dtextPositionX", 126 "boundObjectPropertyPath" : "objectAtCurrentIteration.dtextPositionX",
@@ -164,7 +169,7 @@
164 "bindings": { 169 "bindings": {
165 "objects": { 170 "objects": {
166 "boundObject": {"@": "owner"}, 171 "boundObject": {"@": "owner"},
167 "boundObjectPropertyPath": "arrTracks", 172 "boundObjectPropertyPath": "arrLayers",
168 "oneway": false 173 "oneway": false
169 } 174 }
170 } 175 }
@@ -178,7 +183,7 @@
178 "bindings" : { 183 "bindings" : {
179 "trackID" : { 184 "trackID" : {
180 "boundObject" : {"@" : "repetition2"}, 185 "boundObject" : {"@" : "repetition2"},
181 "boundObjectPropertyPath" : "objectAtCurrentIteration.trackID", 186 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerID",
182 "oneway" : false 187 "oneway" : false
183 }, 188 },
184 "tweens" : { 189 "tweens" : {
@@ -231,6 +236,11 @@
231 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", 236 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed",
232 "oneway" : false 237 "oneway" : false
233 }, 238 },
239 "bypassAnimation" : {
240 "boundObject" : {"@" : "repetition2"},
241 "boundObjectPropertyPath" : "objectAtCurrentIteration.bypassAnimation",
242 "oneway" : false
243 },
234 "isStyleCollapsed" : { 244 "isStyleCollapsed" : {
235 "boundObject" : {"@" : "repetition2"}, 245 "boundObject" : {"@" : "repetition2"},
236 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", 246 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed",
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 59306705..087bf3cd 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -44,14 +44,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
44 this._layerRepetition = newVal; 44 this._layerRepetition = newVal;
45 } 45 }
46 }, 46 },
47
47 _cacheArrays : { 48 _cacheArrays : {
48 value: function() { 49 value: function() {
49 // Cache this.arrLayers and this.arrTracks.
50 this.log('cacheArrays ' + this._boolCacheArrays)
51 if (this._boolCacheArrays) { 50 if (this._boolCacheArrays) {
52 this.log('caching arrays for ', this.application.ninja.currentDocument.name);
53 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; 51 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers;
54 this.application.ninja.currentDocument.tlArrTracks = this.arrTracks; 52
55 } 53 }
56 } 54 }
57 }, 55 },
@@ -72,15 +70,44 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
72 set:function (newVal) { 70 set:function (newVal) {
73 if (newVal !== this._currentLayerNumber) { 71 if (newVal !== this._currentLayerNumber) {
74 this._currentLayerNumber = newVal; 72 this._currentLayerNumber = newVal;
73 this._setCurrentLayerNumber();
75 } 74 }
76 } 75 }
77 }, 76 },
78 77
79 currentLayerSelected:{ 78 _setCurrentLayerNumber:{
80 value: null 79 value:function(){
80 if (this._boolCacheArrays) {
81 this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber;
82 }
83 }
84 },
85
86 _hashKey:{
87 value:0
88 },
89
90 hashKey:{
91 get:function () {
92 return this._hashKey;
93 },
94 set:function (newVal) {
95 if (newVal !== this._hashKey) {
96 this._hashKey = newVal;
97 this._setHashKey();
98 }
99 }
81 }, 100 },
82 101
83 currentTrackSelected:{ 102 _setHashKey:{
103 value:function(){
104 if (this._boolCacheArrays) {
105 this.application.ninja.currentDocument.hashKey = this.hashKey;
106 }
107 }
108 },
109
110 currentLayerSelected:{
84 value: null 111 value: null
85 }, 112 },
86 113
@@ -104,22 +131,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
104 } 131 }
105 }, 132 },
106 133
107 _arrTracks:{
108 serializable:true,
109 value:[]
110 },
111
112 arrTracks:{
113 serializable:true,
114 get:function () {
115 return this._arrTracks;
116 },
117 set:function (newVal) {
118 this._arrTracks = newVal;
119 this._cacheArrays();
120 }
121 },
122
123 _trackRepetition:{ 134 _trackRepetition:{
124 serializable:true, 135 serializable:true,
125 value:null 136 value:null
@@ -163,6 +174,22 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
163 } 174 }
164 }, 175 },
165 176
177 _breadCrumbContainer:{
178 value:null
179 },
180
181 breadCrumbContainer: {
182 set: function(value) {
183 if(this._breadCrumbContainer !== value) {
184 this._breadCrumbContainer = value;
185 this.LayerBinding(this.application.ninja.currentSelectedContainer);
186 }
187 },
188 get: function() {
189 return this._breadCrumbContainer;
190 }
191 },
192
166 _isLayer:{ 193 _isLayer:{
167 value:false 194 value:false
168 }, 195 },
@@ -181,22 +208,21 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
181 value:false, 208 value:false,
182 writable:true 209 writable:true
183 }, 210 },
211
184 timeMarkerHolder:{ 212 timeMarkerHolder:{
185 value: null 213 value: null
186 }, 214 },
187 /* === END: Models === */ 215 /* === END: Models === */
188
189 /* === BEGIN: Draw cycle === */ 216 /* === BEGIN: Draw cycle === */
190 prepareForDraw:{ 217 prepareForDraw:{
191 value:function () { 218 value:function () {
192 this.initTimeline(); 219 this.initTimeline();
193 this.eventManager.addEventListener("onOpenDocument", this, false); 220 this.eventManager.addEventListener("onOpenDocument", this, false);
194 this.eventManager.addEventListener("closeDocument", this, false); 221 this.eventManager.addEventListener("closeDocument", this, false);
195 this.eventManager.addEventListener("switchDocument", this, false); 222 this.eventManager.addEventListener("switchDocument", this, false);
196 } 223 }
197 }, 224 },
198 225
199
200 willDraw:{ 226 willDraw:{