aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js53
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js4
2 files changed, 19 insertions, 38 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 191228af..21ecdc39 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -538,33 +538,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
538 } 538 }
539 }, 539 },
540 540
541 updateTimeText:{
542 value:function (millisec) {
543 var timeText;
544 var sec = (Math.floor((millisec / 1000))) % 60;
545 var min = (Math.floor((millisec / 1000) / 60)) % 60;
546 var milliSec = String(Math.round(millisec / 10));
547 var returnMillisec = milliSec.slice(milliSec.length - 2, milliSec.length);
548 var returnSec;
549 var returnMin;
550 if (sec < 10) {
551 returnSec = "0" + sec;
552 } else {
553 returnSec = sec;
554 }
555 if (min < 10) {
556 returnMin = "0" + min;
557 } else {
558 returnMin = min;
559 }
560 if (millisec == 0) {
561 returnMillisec = "00";
562 }
563 timeText = returnMin + ":" + returnSec + ":" + returnMillisec;
564 this.timetext.innerHTML = timeText;
565 }
566 },
567
568 deselectTweens:{ 541 deselectTweens:{
569 value:function () { 542 value:function () {
570 for (var i = 0; i < this.selectedTweens.length; i++) { 543 for (var i = 0; i < this.selectedTweens.length; i++) {
@@ -771,12 +744,24 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
771 744
772 calculateTimeMarkerValue:{ 745 calculateTimeMarkerValue:{
773 value:function (currentMarker) { 746 value:function (currentMarker) {
774 var timeToReturn;
775 var currentMilliseconds = currentMarker * this.millisecondsOffset; 747 var currentMilliseconds = currentMarker * this.millisecondsOffset;
776 var sec = (Math.floor((currentMilliseconds / 1000))) % 60; 748 return this.convertMillisecondsToTime(currentMilliseconds);
777 var min = (Math.floor((currentMilliseconds / 1000) / 60)) % 60; 749 }
778 var milliSec = String(Math.round(currentMilliseconds / 10)); 750 },
779 var returnMillisec = milliSec.slice(milliSec.length - 2, milliSec.length); 751
752 updateTimeText:{
753 value:function (millisec) {
754 this.timetext.innerHTML = this.convertMillisecondsToTime(millisec);
755 }
756 },
757
758 convertMillisecondsToTime:{
759 value:function(millisec){
760 var timeToReturn;
761 var sec = (Math.floor((millisec / 1000))) % 60;
762 var min = (Math.floor((millisec / 1000) / 60)) % 60;
763 var milliSeconds = String(Math.round(millisec / 10));
764 var returnMillisec = milliSeconds.slice(milliSeconds.length - 2, milliSeconds.length);
780 var returnSec; 765 var returnSec;
781 var returnMin; 766 var returnMin;
782 if (sec < 10) { 767 if (sec < 10) {
@@ -789,8 +774,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
789 } else { 774 } else {
790 returnMin = min; 775 returnMin = min;
791 } 776 }
792 if (currentMarker == 0) { 777 if (returnMillisec == "0") {
793 returnMillisec = "00"; 778 returnMillisec = "0" + returnMillisec;
794 } 779 }
795 timeToReturn = returnMin + ":" + returnSec + ":" + returnMillisec; 780 timeToReturn = returnMin + ":" + returnSec + ":" + returnMillisec;
796 return timeToReturn; 781 return timeToReturn;
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 2096b3ce..601788ad 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -430,8 +430,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
430 draw:{ 430 draw:{
431 value:function () { 431 value:function () {
432 this.ninjaStylesContoller = this.application.ninja.stylesController; 432 this.ninjaStylesContoller = this.application.ninja.stylesController;
433
434 // animatedElement going away - unneeded below
435 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 433 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
436 if(this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]){ 434 if(this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]){
437 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; 435 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0];
@@ -456,9 +454,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
456 value:function (ev) { 454 value:function (ev) {
457 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span 455 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span
458 // This needs to move to a keyboard shortcut that is TBD 456 // This needs to move to a keyboard shortcut that is TBD
459
460 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 457 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
461
462 if (ev.shiftKey) { 458 if (ev.shiftKey) {
463 if (this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList.length == 1) { 459 if (this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList.length == 1) {
464 if (this.tweens.length < 1) { 460 if (this.tweens.length < 1) {