diff options
author | Jonathan Duran | 2012-06-19 11:37:06 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-19 11:37:06 -0700 |
commit | 8a3fb9c3f9b3497884ec7e898924b13dad1d685a (patch) | |
tree | e016f258efbb9d9fc394ecf3cb501deee216c0bb /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |
parent | 53a49f49ce5cd72fbb21e2840bb9622d5952d953 (diff) | |
download | ninja-8a3fb9c3f9b3497884ec7e898924b13dad1d685a.tar.gz |
Fix position tracks collapser to use unique element
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 84bac2cb..26ccfe09 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -41,6 +41,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
41 | this._tween = newVal; | 41 | this._tween = newVal; |
42 | } | 42 | } |
43 | }, | 43 | }, |
44 | |||
45 | positionPropertyTrack:{ | ||
46 | value:null | ||
47 | }, | ||
44 | 48 | ||
45 | _isFirstDraw: { | 49 | _isFirstDraw: { |
46 | value: true | 50 | value: true |
@@ -171,9 +175,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
171 | }, | 175 | }, |
172 | set: function(newVal) { | 176 | set: function(newVal) { |
173 | this._arrPositionTracks = newVal; | 177 | this._arrPositionTracks = newVal; |
174 | if (typeof(this.trackData) === "undefined") { | ||
175 | //this.createTrackData(); | ||
176 | } | ||
177 | this.trackData.arrPositionTracks = newVal; | 178 | this.trackData.arrPositionTracks = newVal; |
178 | 179 | ||
179 | } | 180 | } |
@@ -189,8 +190,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
189 | this._positionTracksRepetition = newVal; | 190 | this._positionTracksRepetition = newVal; |
190 | } | 191 | } |
191 | }, | 192 | }, |
192 | 193 | ||
193 | 194 | ||
194 | /* Transform Property Tracks */ | 195 | /* Transform Property Tracks */ |
195 | _arrTransformTracks : { | 196 | _arrTransformTracks : { |
196 | value: [] | 197 | value: [] |
@@ -470,6 +471,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
470 | this.bypassAnimation = this.trackData.bypassAnimation; | 471 | this.bypassAnimation = this.trackData.bypassAnimation; |
471 | this.trackID = this.trackData.layerID; | 472 | this.trackID = this.trackData.layerID; |
472 | this.tweens = this.trackData.tweens; | 473 | this.tweens = this.trackData.tweens; |
474 | this.arrPositionTracks = this.trackData.arrPositionTracks; | ||
473 | this.animatedElement = this.trackData.animatedElement; | 475 | this.animatedElement = this.trackData.animatedElement; |
474 | this.arrStyleTracks = this.trackData.arrStyleTracks; | 476 | this.arrStyleTracks = this.trackData.arrStyleTracks; |
475 | this.isTrackAnimated = this.trackData.isTrackAnimated; | 477 | this.isTrackAnimated = this.trackData.isTrackAnimated; |
@@ -486,6 +488,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
486 | this.needsDraw = true; | 488 | this.needsDraw = true; |
487 | } | 489 | } |
488 | }, | 490 | }, |
491 | |||
489 | createTrackData: { | 492 | createTrackData: { |
490 | value: function() { | 493 | value: function() { |
491 | tempData = {}; | 494 | tempData = {}; |
@@ -494,6 +497,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
494 | tempData.tweens = this.tweens; | 497 | tempData.tweens = this.tweens; |
495 | tempData.animatedElement = this.animatedElement; | 498 | tempData.animatedElement = this.animatedElement; |
496 | tempData.arrStyleTracks = this.arrStyleTracks; | 499 | tempData.arrStyleTracks = this.arrStyleTracks; |
500 | tempData.arrPositionTracks = this.arrPositionTracks; | ||
497 | tempData.isTrackAnimated = this.isTrackAnimated; | 501 | tempData.isTrackAnimated = this.isTrackAnimated; |
498 | tempData.trackDuration = this.trackDuration; | 502 | tempData.trackDuration = this.trackDuration; |
499 | tempData.animationName = this.animationName; | 503 | tempData.animationName = this.animationName; |
@@ -785,10 +789,23 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
785 | this.nextKeyframe += 1; | 789 | this.nextKeyframe += 1; |
786 | } | 790 | } |
787 | 791 | ||
792 | this.createMatchingPositionSizeTweens(clickPos); | ||
793 | |||
788 | this.application.ninja.currentDocument.model.needsSave = true; | 794 | this.application.ninja.currentDocument.model.needsSave = true; |
789 | } | 795 | } |
790 | }, | 796 | }, |
791 | 797 | ||
798 | createMatchingPositionSizeTweens:{ | ||
799 | value:function (position) { | ||
800 | console.log(this.positionTracksRepetition); | ||
801 | var i; | ||
802 | var posTracks = this.positionTracksRepetition.length; | ||
803 | for (i = 0; i < posTracks; i++) { | ||
804 | |||
805 | } | ||
806 | } | ||
807 | }, | ||
808 | |||
792 | splitTween:{ | 809 | splitTween:{ |
793 | value:function (ev) { | 810 | value:function (ev) { |
794 | var clickPos = ev.target.parentElement.offsetLeft + ev.offsetX, | 811 | var clickPos = ev.target.parentElement.offsetLeft + ev.offsetX, |