Skip to content

Commit

Permalink
fix: modify useOffsetX viewCount default value
Browse files Browse the repository at this point in the history
  • Loading branch information
dohooo committed Dec 5, 2021
1 parent 48205b8 commit dd30b9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useOffsetX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const useOffsetX = (opts: IOpts) => {
loop,
data,
type = 'positive',
viewCount = 1,
viewCount = Math.round((data.length - 1) / 2),
} = opts;
const ITEM_LENGTH = data.length;
const VALID_LENGTH = ITEM_LENGTH - 1;
Expand Down

0 comments on commit dd30b9c

Please sign in to comment.