aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
authorJonathan Duran2012-05-31 08:54:48 -0700
committerJonathan Duran2012-05-31 08:54:48 -0700
commitf297093b5bfa62c9832829751a12f0e556bb5cc0 (patch)
tree6e04cdf142cb1b36e2197970c9dc2141017a2be7 /js/panels/Timeline
parent9253e2ce98d748edd8c3929f113a597923960387 (diff)
parentd49c909cff7f0c5e5d0b127ad84a2fefc6677dc6 (diff)
downloadninja-f297093b5bfa62c9832829751a12f0e556bb5cc0.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts: js/panels/Timeline/Layer.reel/Layer.js js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js js/panels/properties.reel/properties.js Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js17
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js14
3 files changed, 13 insertions, 24 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index f571c1d4..db4ad712 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -482,11 +482,7 @@ var Layer = exports.Layer = Montage.create(Component, {
482 482
483 triggerOutgoingBinding : { 483 triggerOutgoingBinding : {
484 value: function() { 484 value: function() {
485 if (this.layerData.triggerBinding === true) { 485 this.layerData.triggerBinding = !this.layerData.triggerBinding;
486 this.layerData.triggerBinding = false;
487 } else {
488 this.layerData.triggerBinding = true;
489 }
490 } 486 }
491 }, 487 },
492 /* END: Models */ 488 /* END: Models */
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 290dd6c1..a3965eb2 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -487,6 +487,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
487 returnObj.layerData.isVisible = true; 487 returnObj.layerData.isVisible = true;
488 returnObj.layerData.docUUID = this.application.ninja.currentDocument._uuid; 488 returnObj.layerData.docUUID = this.application.ninja.currentDocument._uuid;
489 returnObj.layerData.isTrackAnimated = false; 489 returnObj.layerData.isTrackAnimated = false;
490 returnObj.layerData.triggerBinding = false;
490 returnObj.parentElementUUID = null; 491 returnObj.parentElementUUID = null;
491 returnObj.parentElement = null; 492 returnObj.parentElement = null;
492 493
@@ -679,13 +680,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
679 680
680 // That's all we need to do for a brand new file. 681 // That's all we need to do for a brand new file.
681 // But what if we're opening an existing document? 682 // But what if we're opening an existing document?
682 if (!this.application.ninja.documentController.creatingNewFile) { 683 if (!this.application.ninja.documentController.creatingNewFile && this.application.ninja.currentDocument.currentView !== "code") {
683 // Opening an existing document. If it has DOM elements we need to restore their timeline info 684 // Opening an existing document. If it has DOM elements we need to restore their timeline info
684 if (this.application.ninja.currentDocument.documentRoot.children[0]) { 685 if (this.application.ninja.currentDocument.model.documentRoot.children[0]) {
685 // Yes, it has DOM elements. Loop through them and create a new object for each. 686 // Yes, it has DOM elements. Loop through them and create a new object for each.
686 for (myIndex = 0; this.application.ninja.currentDocument.documentRoot.children[myIndex]; myIndex++) { 687 for (myIndex = 0; this.application.ninja.currentDocument.model.documentRoot.children[myIndex]; myIndex++) {
687 this._openDoc = true; 688 this._openDoc = true;
688 this.restoreLayer(this.application.ninja.currentDocument.documentRoot.children[myIndex]); 689 this.restoreLayer(this.application.ninja.currentDocument.model.documentRoot.children[myIndex]);
689 } 690 }
690 } 691 }
691 } 692 }
@@ -1522,12 +1523,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1522 // Trigger the layer/track data binding 1523 // Trigger the layer/track data binding
1523 triggerLayerBinding : { 1524 triggerLayerBinding : {
1524 value: function(intIndex) { 1525 value: function(intIndex) {
1525 if (this.arrLayers[intIndex].layerData.triggerBinding === true) { 1526 this.arrLayers[intIndex].layerData.triggerBinding = !this.arrLayers[intIndex].layerData.triggerBinding;
1526 this.arrLayers[intIndex].layerData.triggerBinding = false; 1527 }
1527 } else {
1528 this.arrLayers[intIndex].layerData.triggerBinding = true;
1529 }
1530 }
1531 }, 1528 },
1532 1529
1533 handleLayerDragStart : { 1530 handleLayerDragStart : {
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 075290c7..8dc19958 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -453,11 +453,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
453 453
454 triggerOutgoingBinding : { 454 triggerOutgoingBinding : {
455 value: function() { 455 value: function() {
456 if (this.trackData.triggerBinding === true) { 456 this.trackData.triggerBinding = !this.trackData.triggerBinding;
457 this.trackData.triggerBinding = false;
458 } else {
459 this.trackData.triggerBinding = true;
460 }
461 } 457 }
462 }, 458 },
463 459
@@ -527,7 +523,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
527 didDraw:{ 523 didDraw:{
528 value:function () { 524 value:function () {
529 if ((!this.application.ninja.documentController.creatingNewFile)||(!this.application.ninja.currentDocument.setLevel)) { 525 if ((!this.application.ninja.documentController.creatingNewFile)||(!this.application.ninja.currentDocument.setLevel)) {
530 if (this.application.ninja.currentDocument.documentRoot.children[0]) { 526 if (this.application.ninja.currentDocument.model.documentRoot.children[0]) {
531 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 527 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
532 if (selectedIndex !== false) { 528 if (selectedIndex !== false) {
533 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { 529 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) {
@@ -688,7 +684,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
688 this.nextKeyframe += 1; 684 this.nextKeyframe += 1;
689 } 685 }
690 686
691 this.application.ninja.documentController.activeDocument.needsSave = true; 687 this.application.ninja.documentController.activeDocument.model.needsSave = true;
692 } 688 }
693 }, 689 },
694 690
@@ -759,7 +755,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
759 trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); 755 trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration");
760 this.nextKeyframe = 0; 756 this.nextKeyframe = 0;
761 757
762 this.currentKeyframeRule = this.application.ninja.stylesController.getAnimationRuleWithName(this.animationName, this.application.ninja.currentDocument._document); 758 this.currentKeyframeRule = this.application.ninja.stylesController.getAnimationRuleWithName(this.animationName, this.application.ninja.currentDocument.model.views.design.document);
763 759
764 for (i =0; this.currentKeyframeRule[i] ;i++) { 760 for (i =0; this.currentKeyframeRule[i] ;i++) {
765 var newTween = {}; 761 var newTween = {};
@@ -888,7 +884,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
888 keyframeString += " }"; 884 keyframeString += " }";
889 // set the keyframe string as the new rule 885 // set the keyframe string as the new rule
890 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString); 886 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString);
891 this.application.ninja.documentController.activeDocument.needsSave = true; 887 this.application.ninja.documentController.activeDocument.model.needsSave = true;
892 } 888 }
893 }, 889 },
894 890