Skip to content

Commit

Permalink
Fixed segment events
Browse files Browse the repository at this point in the history
See #524
  • Loading branch information
chrisn committed Feb 20, 2024
1 parent 7342789 commit 5d006c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/insert-segment-mouse-drag-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ InsertSegmentMouseDragHandler.prototype.isDragging = function() {
return this._mouseDragHandler.isDragging();
};

InsertSegmentMouseDragHandler.prototype._reset = function() {
this._insertSegment = null;
this._insertSegmentShape = null;
this._segmentIsDraggable = false;
this._peaks.segments.setInserting(false);
};

InsertSegmentMouseDragHandler.prototype._onMouseDown = function(mousePosX, segment) {
this._reset();
this._segment = segment;

if (this._segment) {
Expand Down

0 comments on commit 5d006c1

Please sign in to comment.