Skip to content

Commit c17defa

Browse files
authored
feat: add cancel drag method (#56)
1 parent fb4f152 commit c17defa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ export class Draggable {
139139
};
140140
}
141141

142+
cancelDrag() {
143+
unbind(this.document, "pointermove", this._pointermove);
144+
unbind(this.document, "pointerup", this._pointerup);
145+
unbind(this.document, "pointercancel", this._pointerup);
146+
}
147+
142148
bindTo(element) {
143149
if (element === this._element) {
144150
return;

0 commit comments

Comments
 (0)