Skip to content

Commit 8ec52b8

Browse files
committed
get correct timeline length
1 parent f86fbff commit 8ec52b8

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

src/timeline/js/controllers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ App.controller("TimelineCtrl", function ($scope) {
281281

282282
// Change the scale and apply to scope
283283
$scope.setScroll = function (normalizedScrollValue) {
284-
var timeline_length = Math.min(32767, $scope.getTimelineWidth(0));
284+
var timeline_length = $scope.getTimelineWidth(0);
285285
var scrolling_tracks = $("#scrolling_tracks");
286286
var horz_scroll_offset = normalizedScrollValue * timeline_length;
287287
scrolling_tracks.scrollLeft(horz_scroll_offset);

src/timeline/js/directives/ruler.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ App.directive("tlScrollableTracks", function () {
8888

8989
// Pans the timeline (on middle mouse clip and drag)
9090
element.on("mousemove", function (e) {
91+
9192
if (is_scrolling) {
9293
// Calculate difference from last position
9394
var difference = {x: starting_mouse_position.x - e.pageX, y: starting_mouse_position.y - e.pageY};
@@ -206,8 +207,6 @@ App.directive("tlRuler", function ($timeout) {
206207

207208
fpt = framesPerTick(scope.pixelsPerSecond, scope.project.fps.num ,scope.project.fps.den);
208209
frame = startFrame;
209-
console.log('fpt: ' + fpt);
210-
console.log('startFrame: ' + startFrame);
211210
while ( frame <= endFrame){
212211
t = frame / fps;
213212
pos = t * scope.pixelsPerSecond;

src/windows/views/zoom_slider.py

-9
Original file line numberDiff line numberDiff line change
@@ -399,15 +399,6 @@ def wheelEvent(self, event):
399399

400400
def setZoomFactor(self, zoom_factor):
401401
"""Set the current zoom factor"""
402-
# Get max width of timeline
403-
project_duration = get_app().project.get("duration")
404-
tick_pixels = 100
405-
min_zoom_factor = 1.0
406-
max_zoom_factor = 64.0
407-
if self.scrollbar_position[3] > 0.0:
408-
# Calculate the new zoom factor, based on pixels per tick
409-
max_zoom_factor = project_duration / (self.scrollbar_position[3] / tick_pixels)
410-
411402
# Force recalculation of clips
412403
self.zoom_factor = zoom_factor
413404

0 commit comments

Comments
 (0)