-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2080ce5
commit 5111f17
Showing
5 changed files
with
110 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// TODO: Use real @types/ but that one generates a lot of errors. | ||
declare module "draggabilly" { | ||
type DraggabillyEventData = {}; | ||
interface MoveVector { | ||
x: number; | ||
y: number; | ||
} | ||
type DraggabillyCallback = (event: unknown, pointer: unknown, moveVector: MoveVector) => void; | ||
export default class Draggabilly { | ||
constructor(el: HTMLElement, opts: { | ||
axis: "x" | "y"; | ||
handle: string; | ||
containment: HTMLElement | ||
}); | ||
element: HTMLElement; | ||
on(event: "pointerDown" | "dragStart" | "dragEnd" | "dragMove", callback: Callback) | ||
dragEnd(); | ||
isDragging: boolean; | ||
positionDrag: () => void; | ||
destroy(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.