Skip to content

Commit

Permalink
Fixed mouse drag handler
Browse files Browse the repository at this point in the history
See #509
  • Loading branch information
chrisn committed Oct 18, 2023
1 parent 28c2d6f commit ec5d802
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scroll-mouse-drag-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ ScrollMouseDragHandler.prototype._onMouseDown = function(mousePosX, segment) {
}

if (this._seeking) {
this._seek(mousePosX);
mousePosX = clamp(mousePosX, 0, this._view.getWidth());

const time = this._view.pixelsToTime(mousePosX + this._view.getFrameOffset());

this._seek(time);
}
else {
this._initialFrameOffset = this._view.getFrameOffset();
Expand Down

0 comments on commit ec5d802

Please sign in to comment.