diff options
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 25452891..84d93ea3 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -548,6 +548,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
548 | handleNewTween:{ | 548 | handleNewTween:{ |
549 | value:function (ev) { | 549 | value:function (ev) { |
550 | if (ev.offsetX > this.tweens[this.tweens.length - 1].tweenData.keyFramePosition) { | 550 | if (ev.offsetX > this.tweens[this.tweens.length - 1].tweenData.keyFramePosition) { |
551 | var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); | ||
552 | this.application.ninja.timeline.selectLayer(selectedIndex, false); | ||
551 | this.insertTween(ev.offsetX); | 553 | this.insertTween(ev.offsetX); |
552 | } else { | 554 | } else { |
553 | this.splitTween(ev); | 555 | this.splitTween(ev); |
@@ -557,6 +559,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
557 | 559 | ||
558 | insertTween:{ | 560 | insertTween:{ |
559 | value:function (clickPos) { | 561 | value:function (clickPos) { |
562 | var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); | ||
563 | this.application.ninja.timeline.selectLayer(selectedIndex, true); | ||
564 | |||
560 | var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); | 565 | var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); |
561 | var currentMillisec = currentMillisecPerPixel * clickPos; | 566 | var currentMillisec = currentMillisecPerPixel * clickPos; |
562 | this.trackDuration = currentMillisec; | 567 | this.trackDuration = currentMillisec; |