diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 13 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 478 |
2 files changed, 242 insertions, 249 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index 77481ac0..ae1bcddf 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | |||
@@ -101,11 +101,6 @@ | |||
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 | }, | ||
109 | "isSelected" : { | 104 | "isSelected" : { |
110 | "boundObject" : {"@" : "repetition1"}, | 105 | "boundObject" : {"@" : "repetition1"}, |
111 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isSelected", | 106 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isSelected", |
@@ -121,9 +116,9 @@ | |||
121 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", | 116 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", |
122 | "oneway" : false | 117 | "oneway" : false |
123 | }, | 118 | }, |
124 | "animateCollapser" : { | 119 | "bypassAnimation" : { |
125 | "boundObject" : {"@" : "repetition1"}, | 120 | "boundObject" : {"@" : "repetition1"}, |
126 | "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser", | 121 | "boundObjectPropertyPath" : "objectAtCurrentIteration.bypassAnimation", |
127 | "oneway" : false | 122 | "oneway" : false |
128 | }, | 123 | }, |
129 | "dtextPositionX" : { | 124 | "dtextPositionX" : { |
@@ -241,9 +236,9 @@ | |||
241 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", | 236 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", |
242 | "oneway" : false | 237 | "oneway" : false |
243 | }, | 238 | }, |
244 | "animateCollapser" : { | 239 | "bypassAnimation" : { |
245 | "boundObject" : {"@" : "repetition2"}, | 240 | "boundObject" : {"@" : "repetition2"}, |
246 | "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser", | 241 | "boundObjectPropertyPath" : "objectAtCurrentIteration.bypassAnimation", |
247 | "oneway" : false | 242 | "oneway" : false |
248 | }, | 243 | }, |
249 | "isStyleCollapsed" : { | 244 | "isStyleCollapsed" : { |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 91277a63..087bf3cd 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -49,6 +49,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
49 | value: function() { | 49 | value: function() { |
50 | if (this._boolCacheArrays) { | 50 | if (this._boolCacheArrays) { |
51 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; | 51 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; |
52 | |||
52 | } | 53 | } |
53 | } | 54 | } |
54 | }, | 55 | }, |
@@ -69,6 +70,39 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
69 | set:function (newVal) { | 70 | set:function (newVal) { |
70 | if (newVal !== this._currentLayerNumber) { | 71 | if (newVal !== this._currentLayerNumber) { |
71 | this._currentLayerNumber = newVal; | 72 | this._currentLayerNumber = newVal; |
73 | this._setCurrentLayerNumber(); | ||
74 | } | ||
75 | } | ||
76 | }, | ||
77 | |||
78 | _setCurrentLayerNumber:{ | ||
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 | } | ||
100 | }, | ||
101 | |||
102 | _setHashKey:{ | ||
103 | value:function(){ | ||
104 | if (this._boolCacheArrays) { | ||
105 | this.application.ninja.currentDocument.hashKey = this.hashKey; | ||
72 | } | 106 | } |
73 | } | 107 | } |
74 | }, | 108 | }, |
@@ -97,22 +131,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
97 | } | 131 | } |
98 | }, | 132 | }, |
99 | 133 | ||
100 | _arrTracks:{ | ||
101 | serializable:true, | ||
102 | value:[] | ||
103 | }, | ||
104 | |||
105 | arrTracks:{ | ||
106 | serializable:true, | ||
107 | get:function () { | ||
108 | return this._arrTracks; | ||
109 | }, | ||
110 | set:function (newVal) { | ||
111 | this._arrTracks = newVal; | ||
112 | this._cacheArrays(); | ||
113 | } | ||
114 | }, | ||
115 | |||
116 | _trackRepetition:{ | 134 | _trackRepetition:{ |
117 | serializable:true, | 135 | serializable:true, |
118 | value:null | 136 | value:null |
@@ -156,6 +174,22 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
156 | } | 174 | } |
157 | }, | 175 | }, |
158 | 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 | |||
159 | _isLayer:{ | 193 | _isLayer:{ |
160 | value:false | 194 | value:false |
161 | }, | 195 | }, |
@@ -204,11 +238,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
204 | value: function(boolUnbind) { | 238 | value: function(boolUnbind) { |
205 | var arrEvents = ["deleteLayerClick", | 239 | var arrEvents = ["deleteLayerClick", |
206 | "newLayer", | 240 | "newLayer", |
207 | "deleteLayer", | 241 | "deleteLayer", |
208 | "layerBinding", | ||
209 | "elementAdded", | 242 | "elementAdded", |
210 | "elementDeleted", | 243 | "elementDeleted", |
211 | "deleteSelection", | ||
212 | "selectionChange"], | 244 | "selectionChange"], |
213 | i, | 245 | i, |
214 | arrEventsLength = arrEvents.length; | 246 | arrEventsLength = arrEvents.length; |
@@ -221,6 +253,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
221 | for (i = 0; i < arrEventsLength; i++) { | 253 | for (i = 0; i < arrEventsLength; i++) { |
222 | this.eventManager.addEventListener(arrEvents[i], this, false); | 254 | this.eventManager.addEventListener(arrEvents[i], this, false); |
223 | } | 255 | } |
256 | Object.defineBinding(this, "breadCrumbContainer", { | ||
257 | boundObject: this.application.ninja, | ||
258 | boundObjectPropertyPath:"currentSelectedContainer", | ||
259 | oneway: true | ||
260 | }); | ||
224 | } | 261 | } |
225 | } | 262 | } |
226 | }, | 263 | }, |
@@ -247,8 +284,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
247 | value:function () { | 284 | value:function () { |
248 | var myIndex; | 285 | var myIndex; |
249 | this.drawTimeMarkers(); | 286 | this.drawTimeMarkers(); |
250 | this._hashKey = "123"; | 287 | |
251 | |||
252 | // Document switching | 288 | // Document switching |
253 | // Check to see if we have saved timeline information in the currentDocument. | 289 | // Check to see if we have saved timeline information in the currentDocument. |
254 | if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") { | 290 | if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") { |
@@ -257,50 +293,60 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
257 | this.application.ninja.currentDocument.isTimelineInitialized = true; | 293 | this.application.ninja.currentDocument.isTimelineInitialized = true; |
258 | this.application.ninja.currentDocument.tlArrLayers = []; | 294 | this.application.ninja.currentDocument.tlArrLayers = []; |
259 | this.application.ninja.currentDocument.tlArrTracks = []; | 295 | this.application.ninja.currentDocument.tlArrTracks = []; |
260 | 296 | this.application.ninja.currentDocument.tll |