diff options
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 5 | ||||
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 4 |
2 files changed, 7 insertions, 2 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; |
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index e4fb42b3..5fdf71d6 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -186,7 +186,7 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
186 | 186 | ||
187 | setAbsoluteTweenProperties:{ | 187 | setAbsoluteTweenProperties:{ |
188 | value:function (eventDetail) { | 188 | value:function (eventDetail) { |
189 | console.log(eventDetail); | 189 | //console.log(eventDetail); |
190 | if (this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"] && this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]) { | 190 | if (this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"] && this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]) { |
191 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; | 191 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; |
192 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; | 192 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; |
@@ -200,7 +200,7 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
200 | 200 | ||
201 | setRelativeTweenProperties:{ | 201 | setRelativeTweenProperties:{ |
202 | value:function(eventDetail){ | 202 | value:function(eventDetail){ |
203 | 203 | //console.log(eventDetail); | |
204 | } | 204 | } |
205 | }, | 205 | }, |
206 | 206 | ||