Skip to content

Commit

Permalink
feat: add cancel drag method (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanisslav authored Oct 30, 2023
1 parent fb4f152 commit c17defa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export class Draggable {
};
}

cancelDrag() {
unbind(this.document, "pointermove", this._pointermove);
unbind(this.document, "pointerup", this._pointerup);
unbind(this.document, "pointercancel", this._pointerup);
}

bindTo(element) {
if (element === this._element) {
return;
Expand Down

0 comments on commit c17defa

Please sign in to comment.