I am attempting to use some code I found on https://github.com/bevacqua/dragula/issues/289#issuecomment-277143172 to my Ionic project.
When I run the code I get an
A quick way to solve this problem is here.
Basically change setTimeout and clearInterval to window.setTimeout and window.clearInterval, respectively. For example, your onDown becomes:
onDown(e: Event) {
this.touchTimeout = window.setTimeout(() => {
this.draggable = true;
}, this.dragDelay);
}
Then, your declaration becomes:
this.touchTimeout: number | undefined;