Skip to content

Commit

Permalink
fix: removed rounding up from useNormalizedSnapPoints hook. (#169)
Browse files Browse the repository at this point in the history
* fixes #168

* chore: revert previous changes

* chore: remove rounding up from use normalized snap points hook

Co-authored-by: Mo Gorhom <gorhom@me.com>
  • Loading branch information
mr-moto and gorhom authored Jan 8, 2021
1 parent 61a3841 commit 1257c46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hooks/useNormalizedSnapPoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export const useNormalizedSnapPoints = (
if (normalizedSnapPoint === 0 && handleHeight !== 0) {
normalizedSnapPoint = normalizedSnapPoint - handleHeight;
}
return Math.ceil(
Math.max(containerHeight - normalizedSnapPoint - handleHeight, topInset)
return Math.max(
containerHeight - normalizedSnapPoint - handleHeight,
topInset
);
});
}, [snapPoints, topInset, containerHeight, handleHeight]);

0 comments on commit 1257c46

Please sign in to comment.