From bafa105c753a139847ef5e0bc8070ce0e8d16f77 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 8 May 2012 12:04:57 -0700 Subject: Timeline: Bug fix: Account for horizontal scroll when dragging keyframes. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 3 ++- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index 8ddc81cd..5c957619 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html @@ -20,6 +20,7 @@ "track_container": {"#": "right_inside"}, "timeline_leftpane" : {"#" : "leftpane_inside"}, "layer_tracks": {"#": "layer_tracks"}, + "layout_tracks": {"#": "layout_tracks"}, "master_track": {"#": "master_track"}, "time_markers" : {"#": "timeline_markers"}, "layerRepetition" : {"@": "repetition1"}, @@ -211,7 +212,7 @@
-
+
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 41472359..933ed9cc 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1580,7 +1580,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { } */ //currPos = event.y - (this._dragAndDropHelperOffset - this.user_layers.scrollTop)- 28; - currPos = event.x - 277; + + currPos = (event.x + this.layout_tracks.scrollLeft) - 277; // too much or too little? if (currPos < this.trackRepetition.childComponents[this.draggingTrackId-1]._keyframeMinPosition) { @@ -1613,7 +1614,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { * */ - var currPos = event.x - 274, + var currPos = (event.x + this.layout_tracks.scrollLeft) - 277, currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80), currentMillisec = 0, i = 0, -- cgit v1.2.3