aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js34
1 files changed, 9 insertions, 25 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 17e50789..18df20c2 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -27,7 +27,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
27 }, 27 },
28 set:function (value) { 28 set:function (value) {
29 this._trackID = value; 29 this._trackID = value;
30 this.needsDraw = true; 30 //this.needsDraw = true;
31 } 31 }
32 }, 32 },
33 33
@@ -114,7 +114,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
114 }, 114 },
115 set: function(newVal) { 115 set: function(newVal) {
116 this._arrStyleTracks = newVal; 116 this._arrStyleTracks = newVal;
117 this.needsDraw = true; 117 //this.needsDraw = true;
118 } 118 }
119 }, 119 },
120 _styleTracksRepetition: { 120 _styleTracksRepetition: {
@@ -128,7 +128,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
128 }, 128 },
129 set: function(newVal) { 129 set: function(newVal) {
130 this._styleTracksRepetition = newVal; 130 this._styleTracksRepetition = newVal;
131 this.needsDraw = true; 131 //needsDraw = true;
132 } 132 }
133 }, 133 },
134 134
@@ -146,7 +146,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
146 }, 146 },
147 set: function(newVal) { 147 set: function(newVal) {
148 this._arrPositionTracks = newVal; 148 this._arrPositionTracks = newVal;
149 this.needsDraw = true; 149 //this.needsDraw = true;
150 } 150 }
151 }, 151 },
152 _positionTracksRepetition: { 152 _positionTracksRepetition: {
@@ -160,7 +160,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
160 }, 160 },
161 set: function(newVal) { 161 set: function(newVal) {
162 this._positionTracksRepetition = newVal; 162 this._positionTracksRepetition = newVal;
163 this.needsDraw = true; 163 //this.needsDraw = true;
164 } 164 }
165 }, 165 },
166 166
@@ -179,7 +179,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
179 }, 179 },
180 set: function(newVal) { 180 set: function(newVal) {
181 this._arrTransformTracks = newVal; 181 this._arrTransformTracks = newVal;
182 this.needsDraw = true; 182 //this.needsDraw = true;
183 } 183 }
184 }, 184 },
185 _transformTracksRepetition: { 185 _transformTracksRepetition: {
@@ -193,7 +193,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
193 }, 193 },
194 set: function(newVal) { 194 set: function(newVal) {
195 this._transformTracksRepetition = newVal; 195 this._transformTracksRepetition = newVal;
196 this.needsDraw = true; 196 //this.needsDraw = true;
197 } 197 }
198 }, 198 },
199 199
@@ -209,7 +209,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
209 }, 209 },
210 set:function (newVal) { 210 set:function (newVal) {
211 this._tweens = newVal; 211 this._tweens = newVal;
212 this.needsDraw=true; 212 //this.needsDraw=true;
213 } 213 }
214 }, 214 },
215 215
@@ -379,6 +379,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
379 this.bypassAnimation = this.trackData.bypassAnimation; 379 this.bypassAnimation = this.trackData.bypassAnimation;
380 this.isStyleCollapsed = this.trackData.isStyleCollapsed; 380 this.isStyleCollapsed = this.trackData.isStyleCollapsed;
381 this.trackPosition = this.trackData.trackPosition; 381 this.trackPosition = this.trackData.trackPosition;
382 this.needsDraw = true;
382 } 383 }
383 }, 384 },
384 385
@@ -393,20 +394,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
393 draw:{ 394 draw:{
394 value:function () { 395 value:function () {
395 this.ninjaStylesContoller = this.application.ninja.stylesController; 396 this.ninjaStylesContoller = this.application.ninja.stylesController;
396 return;
397 if (this._mainCollapser.isCollapsed !== this.isMainCollapsed) {
398 this._mainCollapser.toggle(false);
399 }
400 if (this._positionCollapser.isCollapsed !== this.isPositionCollapsed) {
401 this._positionCollapser.toggle(false);
402 }
403 if (this._transformCollapser.isCollapsed !== this.isTransformCollapsed) {
404 this._transformCollapser.toggle(false);
405 }
406 if (this._styleCollapser.isCollapsed !== this.isStyleCollapsed) {
407 this._styleCollapser.toggle(false);
408 }
409
410 } 397 }
411 }, 398 },
412 399
@@ -457,11 +444,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
457 444
458 insertTween:{ 445 insertTween:{
459 value:function (clickPos) { 446 value:function (clickPos) {
460 // calculate new tween's keyframe milliseconds by clickPos
461 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); 447 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
462 var currentMillisec = currentMillisecPerPixel * clickPos; 448 var currentMillisec = currentMillisecPerPixel * clickPos;
463
464 // need to check timeline master duration if greater than this track duration
465 this.trackDuration = currentMillisec; 449 this.trackDuration = currentMillisec;
466 var newTween = {}; 450 var newTween = {};
467 newTween.tweenData = {}; 451 newTween.tweenData = {};