aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
authorJonathan Duran2012-03-29 07:29:36 -0700
committerJonathan Duran2012-03-29 07:29:36 -0700
commitaa9d13bb03f9fdc090bbf78c10ed8d5c79895019 (patch)
treeac2214b01e37fe274641e5b08005e9cf4053c4e7 /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
parentab730848419a0b72c4c2747a3c928f2c8cc763e7 (diff)
parent7845d312396e3329ac9246d4c13e99cb623216d5 (diff)
downloadninja-aa9d13bb03f9fdc090bbf78c10ed8d5c79895019.tar.gz
Merge branch 'refs/heads/timeline-local' into TimelineUber
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 5e9868f0..978b239f 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -381,6 +381,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
381 381
382 setData:{ 382 setData:{
383 value:function(){ 383 value:function(){
384 if (typeof(this.trackData) === "undefined") {
385 return;
386 }
384 this.bypassAnimation = this.trackData.bypassAnimation; 387 this.bypassAnimation = this.trackData.bypassAnimation;
385 this.trackID = this.trackData.layerID; 388 this.trackID = this.trackData.layerID;
386 this.tweens = this.trackData.tweens; 389 this.tweens = this.trackData.tweens;
@@ -439,9 +442,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
439 value:function () { 442 value:function () {
440 this.ninjaStylesContoller = this.application.ninja.stylesController; 443 this.ninjaStylesContoller = this.application.ninja.stylesController;
441 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 444 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
442 if(this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]){ 445 if (selectedIndex !== false) {
443 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; 446 if(this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]){
447 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0];
448 }
444 } 449 }
450
445 } 451 }
446 }, 452 },
447 453
@@ -450,9 +456,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
450 if (!this.application.ninja.documentController.creatingNewFile) { 456 if (!this.application.ninja.documentController.creatingNewFile) {
451 if (this.application.ninja.currentDocument.documentRoot.children[0]) { 457 if (this.application.ninja.currentDocument.documentRoot.children[0]) {
452 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 458 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
453 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { 459 if (selectedIndex !== false) {
454 this.retrieveStoredTweens(); 460 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) {
461 this.retrieveStoredTweens();
462 }
455 } 463 }
464
456 } 465 }
457 } 466 }
458 } 467 }