aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-21 09:55:19 -0700
committerJose Antonio Marquez2012-06-21 09:55:19 -0700
commitbf6bed611714053aabc0d38978bddd62873d04aa (patch)
treef648fa7842f3dc6011da08aaab0bedb445d43b58 /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
parent54b15b3c39835ea999d9ddd8038a5531630e266d (diff)
parentc8fc6d15e1570e89243abe527cd149e354f7e11f (diff)
downloadninja-bf6bed611714053aabc0d38978bddd62873d04aa.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js549
1 files changed, 475 insertions, 74 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 87a5e156..bf380e00 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -42,6 +42,14 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
42 } 42 }
43 }, 43 },
44 44
45 positionPropertyTrack:{
46 value:null
47 },
48
49 _isFirstDraw: {
50 value: true
51 },
52
45 _isVisible:{ 53 _isVisible:{
46 value: true 54 value: true
47 }, 55 },
@@ -147,6 +155,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
147 value: null 155 value: null
148 }, 156 },
149 styleTracksRepetition : { 157 styleTracksRepetition : {
158 serializable:true,
150 get: function() { 159 get: function() {
151 return this._styleTracksRepetition; 160 return this._styleTracksRepetition;
152 }, 161 },
@@ -166,9 +175,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
166 }, 175 },
167 set: function(newVal) { 176 set: function(newVal) {
168 this._arrPositionTracks = newVal; 177 this._arrPositionTracks = newVal;
169 if (typeof(this.trackData) === "undefined") {
170 //this.createTrackData();
171 }
172 this.trackData.arrPositionTracks = newVal; 178 this.trackData.arrPositionTracks = newVal;
173 179
174 } 180 }
@@ -184,8 +190,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
184 this._positionTracksRepetition = newVal; 190 this._positionTracksRepetition = newVal;
185 } 191 }
186 }, 192 },
187 193
188 194
189 /* Transform Property Tracks */ 195 /* Transform Property Tracks */
190 _arrTransformTracks : { 196 _arrTransformTracks : {
191 value: [] 197 value: []
@@ -200,17 +206,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
200 this.trackData.arrTransformTracks = newVal; 206 this.trackData.arrTransformTracks = newVal;
201 } 207 }
202 }, 208 },
203 _transformTracksRepetition: {
204 value: null
205 },
206 transformTracksRepetition : {
207 get: function() {
208 return this._transformTracksRepetition;
209 },
210 set: function(newVal) {
211 this._transformTracksRepetition = newVal;
212 }
213 },
214 209
215 _tweens:{ 210 _tweens:{
216 value:[] 211 value:[]
@@ -233,10 +228,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
233 228
234 tweenRepetition:{ 229 tweenRepetition:{
235 get:function () { 230 get:function () {
236 return this._spanRepetition; 231 return this._tweenRepetition;
237 }, 232 },
238 set:function (newVal) { 233 set:function (newVal) {
239 this._spanRepetition = newVal; 234 this._tweenRepetition = newVal;
240 } 235 }
241 }, 236 },
242 237
@@ -341,6 +336,23 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
341 } 336 }
342 }, 337 },
343 338
339 _ruleList:{
340 value:[]
341 },
342
343 ruleList:{
344 get:function () {
345 return this._ruleList;
346 },
347 set:function (val) {
348 this._ruleList = val;
349 }
350 },
351
352 animationNamesString:{
353 value:""
354 },
355
344 ninjaStylesContoller:{ 356 ninjaStylesContoller:{
345 value:null 357 value:null
346 }, 358 },
@@ -394,6 +406,42 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
394 } 406 }
395 }, 407 },
396 408
409 // Drag and Drop properties
410 _dragAndDropHelper : {
411 value: false
412 },
413 _dragAndDropHelperCoords: {
414 value: false
415 },
416 dragAndDropHelperCoords: {
417 get: function() {
418 return this._dragAndDropHelperCoords;
419 },
420 set: function(newVal) {
421 this._dragAndDropHelperCoords = newVal;
422 }
423 },
424 _draggingIndex: {
425 value: false
426 },
427 draggingIndex: {
428 get: function() {
429 return this._draggingIndex;
430 },
431 set: function(newVal) {
432 this._draggingIndex = newVal;
433 }
434 },
435 _dragAndDropHelperOffset : {
436 value: false
437 },
438 _appendHelper: {
439 value: false
440 },
441 _deleteHelper: {
442 value: false
443 },
444
397 _trackData:{ 445 _trackData:{
398 value: false 446 value: false
399 }, 447 },
@@ -423,7 +471,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
423 this.bypassAnimation = this.trackData.bypassAnimation; 471 this.bypassAnimation = this.trackData.bypassAnimation;
424 this.trackID = this.trackData.layerID; 472 this.trackID = this.trackData.layerID;
425 this.tweens = this.trackData.tweens; 473 this.tweens = this.trackData.tweens;
426 this.animatedElement = this.trackData.animatedElement; // unneeded with one element per layer restriction 474 this.arrPositionTracks = this.trackData.arrPositionTracks;
475 this.animatedElement = this.trackData.animatedElement;
427 this.arrStyleTracks = this.trackData.arrStyleTracks; 476 this.arrStyleTracks = this.trackData.arrStyleTracks;
428 this.isTrackAnimated = this.trackData.isTrackAnimated; 477 this.isTrackAnimated = this.trackData.isTrackAnimated;
429 this.trackDuration = this.trackData.trackDuration; 478 this.trackDuration = this.trackData.trackDuration;
@@ -435,9 +484,11 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
435 this.isStyleCollapsed = this.trackData.isStyleCollapsed; 484 this.isStyleCollapsed = this.trackData.isStyleCollapsed;
436 this.trackPosition = this.trackData.trackPosition; 485 this.trackPosition = this.trackData.trackPosition;
437 this.isVisible = this.trackData.isVisible; 486 this.isVisible = this.trackData.isVisible;
487 this.trackEditorProperty = "master";
438 this.needsDraw = true; 488 this.needsDraw = true;
439 } 489 }
440 }, 490 },
491
441 createTrackData: { 492 createTrackData: {
442 value: function() { 493 value: function() {
443 tempData = {}; 494 tempData = {};
@@ -446,6 +497,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
446 tempData.tweens = this.tweens; 497 tempData.tweens = this.tweens;
447 tempData.animatedElement = this.animatedElement; 498 tempData.animatedElement = this.animatedElement;
448 tempData.arrStyleTracks = this.arrStyleTracks; 499 tempData.arrStyleTracks = this.arrStyleTracks;
500 tempData.arrPositionTracks = this.arrPositionTracks;
449 tempData.isTrackAnimated = this.isTrackAnimated; 501 tempData.isTrackAnimated = this.isTrackAnimated;
450 tempData.trackDuration = this.trackDuration; 502 tempData.trackDuration = this.trackDuration;
451 tempData.animationName = this.animationName; 503 tempData.animationName = this.animationName;
@@ -488,6 +540,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
488 this.ninjaStylesContoller = this.application.ninja.stylesController; 540 this.ninjaStylesContoller = this.application.ninja.stylesController;
489 this.element.addEventListener("click", this, false); 541 this.element.addEventListener("click", this, false);
490 this.eventManager.addEventListener("tlZoomSlider", this, false); 542 this.eventManager.addEventListener("tlZoomSlider", this, false);
543
544 // Drag and Drop event handlers
545 //this.element.addEventListener("dragover", this.handleKeyframeDragover.bind(this), false);
546 this.element.addEventListener("dragsta