-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: angle calulation bug [publish-beta] (#14)
* Fix: angle calulation bug - Round up angle to 0 to 2 * PI - Add prettier & auto formatting on save config * update package version
- Loading branch information
1 parent
5a74b2a
commit cf5a753
Showing
10 changed files
with
62 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "always", | ||
"jsxBracketSameLine": true | ||
} |
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,3 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { default as useSwipe, SWIPE_DIRECTION } from './useSwipe'; | ||
export { default as useSwipePosition } from './useSwipePosition'; | ||
export { default as useSwipeVector } from './useSwipeVector'; | ||
export { default as useSwipeVector } from './useSwipeVector'; |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { RefObject } from "react"; | ||
import { RefObject } from 'react'; | ||
export interface UseSwipeOptions { | ||
// ref of the container where you want to attach swipe event | ||
ref: RefObject<HTMLElement>; | ||
// (optional) no of pixels to move your finger to trigger a swipe event. | ||
// (optional) no of pixels to move your finger to trigger a swipe event. | ||
// Larger this value means less sensitivity. Default value is 5 (5px) | ||
thresholdPX?: number; | ||
unit?: 'rad' | 'deg';// unit of direction for useSwipeVector hook | ||
}; | ||
unit?: 'rad' | 'deg'; // unit of direction for useSwipeVector hook | ||
// whether to use position units based relative to canvas rather than with respect to window | ||
useRelativeUnits?: boolean; | ||
} |
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