Open dtsmarin opened 2 years ago
I'm happy when it works for you, but usually 'whileDrag' is not supposed to accept callback. I am somewhat surprised, that it kind of works. I tested myself, it seems the 'whileDrag' is called once the drag starts and once when it is done, both times without any argument.
'onDrag' accepts a callback and is called over and over while dragged.
If you just want to silence Typescript you could cast your handler to 'any' const handleTouch : any = ()=>{...}
I'm getting a type error because I'm trying to use a function inside whileDrag
The code works fine and does exactly what I need though. Execute a function while the object is being dragged.
Is there any way to disable this type checking?
I'm using Svelte with Vite.