Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed Aug 28, 2023
1 parent 0441974 commit f75fe01
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/dragdrop/dom-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class DragDropDOMAdapter implements IDragDropDOMAdapter {
private savedTargetNode: any;
private scrollIntervalId: number = null;

constructor(private dd: IDragDropEngine, private longTap?: boolean) {}
constructor(private dd: IDragDropEngine, private longTap: boolean = true) {}

private get rootElement() {
if(isShadowDOM(settings.environment.root)) {
Expand Down Expand Up @@ -83,11 +83,6 @@ export class DragDropDOMAdapter implements IDragDropDOMAdapter {
document.body.style.setProperty("user-select", "none", "important");
document.body.style.setProperty("-webkit-user-select", "none", "important");

let longTap = this.longTap;
if (typeof longTap === "undefined") {
longTap = true;
}

this.timeoutID = setTimeout(() => {
this.doStartDrag(
event,
Expand All @@ -110,7 +105,7 @@ export class DragDropDOMAdapter implements IDragDropDOMAdapter {
}

this.stopLongTap();
}, longTap ? 500: 0);
}, this.longTap ? 500: 0);

document.addEventListener("pointerup", this.stopLongTap);
document.addEventListener("pointermove", this.stopLongTapIfMoveEnough);
Expand Down

0 comments on commit f75fe01

Please sign in to comment.