aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 3a961b51..8859e115 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -1586,11 +1586,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1586 currPos = (event.x + this.layout_tracks.scrollLeft) - 277; 1586 currPos = (event.x + this.layout_tracks.scrollLeft) - 277;
1587 1587
1588 // Prevent dragging beyond previous or next keyframe, if any 1588 // Prevent dragging beyond previous or next keyframe, if any
1589 if (currPos < this.trackRepetition.childComponents[this.draggingTrackId-1]._keyframeMinPosition) { 1589 if (currPos < this.trackRepetition.childComponents[this.draggingTrackId]._keyframeMinPosition) {
1590 currPos = this.trackRepetition.childComponents[this.draggingTrackId-1]._keyframeMinPosition; 1590 currPos = this.trackRepetition.childComponents[this.draggingTrackId]._keyframeMinPosition;
1591 } 1591 }
1592 if (currPos > this.trackRepetition.childComponents[this.draggingTrackId-1]._keyframeMaxPosition) { 1592 if (currPos > this.trackRepetition.childComponents[this.draggingTrackId]._keyframeMaxPosition) {
1593 currPos = this.trackRepetition.childComponents[this.draggingTrackId-1]._keyframeMaxPosition; 1593 currPos = this.trackRepetition.childComponents[this.draggingTrackId]._keyframeMaxPosition;
1594 } 1594 }
1595 1595
1596 // Automatic scrolling when dragged to edge of window 1596 // Automatic scrolling when dragged to edge of window
@@ -1604,8 +1604,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1604 } 1604 }
1605 1605
1606 // Set up values in appropriate track and set that track to draw. 1606 // Set up values in appropriate track and set that track to draw.
1607 this.trackRepetition.childComponents[this.draggingTrackId-1].dragAndDropHelperCoords = currPos + "px"; 1607 this.trackRepetition.childComponents[this.draggingTrackId].dragAndDropHelperCoords = currPos + "px";
1608 this.trackRepetition.childComponents[this.draggingTrackId-1].needsDraw = true; 1608 this.trackRepetition.childComponents[this.draggingTrackId].needsDraw = true;
1609 return false; 1609 return false;
1610 } 1610 }
1611 }, 1611 },
@@ -1622,7 +1622,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1622 currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80), 1622 currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80),
1623 currentMillisec = 0, 1623 currentMillisec = 0,
1624 i = 0, 1624 i = 0,
1625 trackIndex = this.draggingTrackId -1, 1625 trackIndex = this.draggingTrackId,
1626 tweenIndex = this.trackRepetition.childComponents[trackIndex].draggingIndex; 1626 tweenIndex = this.trackRepetition.childComponents[trackIndex].draggingIndex;
1627 1627
1628 // Make sure drop happens between previous and next keyframe, if any. 1628 // Make sure drop happens between previous and next keyframe, if any.
@@ -1656,11 +1656,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1656 } 1656 }
1657 this.trackRepetition.childComponents[trackIndex].tweenRepetition.childComponents[tweenIndex].selectTween(); 1657 this.trackRepetition.childComponents[trackIndex].tweenRepetition.childComponents[tweenIndex].selectTween();
1658 this.trackRepetition.childComponents[trackIndex].updateKeyframeRule(); 1658 this.trackRepetition.childComponents[trackIndex].updateKeyframeRule();
1659
1660 // If this is the last keyframe, we'll need to update the track duration
1661 if (tweenIndex === (this.trackRepetition.childComponents[trackIndex].tweens.length-1)) {
1662 this.arrLayers[trackIndex].layerData.trackDuration = currentMillisec;
1663 this.resetMasterDuration();
1664 }
1659 return false; 1665 return false;
1660 } 1666 }
1661 }, 1667 },
1662 /* === END: Controllers === */ 1668 /* === END: Controllers === */
1663 1669
1664 /* === BEGIN: Logging routines === */ 1670 /* === BEGIN: Logging routines === */
1665 _boolDebug:{ 1671 _boolDebug:{
1666 enumerable:false, 1672 enumerable:false,