Skip to content

Commit

Permalink
feat: 🎸 update the namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
prc5 committed Oct 19, 2024
1 parent 552e29c commit 32df43b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-theater",
"version": "0.0.0",
"name": "@react-theater/scroll",
"version": "0.0.1",
"author": "prc5",
"license": "MIT",
"description": "React animations helpers",
Expand Down
5 changes: 4 additions & 1 deletion src/utils/get-position.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ export const getPosition = ({ scroll, height }: { scroll: number; height: number
const position = Math.max(0, Math.min(scroll + window.innerHeight, height));
const positionOut = Math.max(0, Math.min(scroll + window.innerHeight / 10, height));
const positionScroll = Math.max(0, Math.min(scroll + window.innerHeight, window.innerHeight));
const positionScrollOut = Math.max(0, Math.min(scroll + window.innerHeight - height, window.innerHeight));
const positionScrollOut = Math.max(
0,
Math.min(scroll + window.innerHeight - height, window.innerHeight),
);

return {
position,
Expand Down

0 comments on commit 32df43b

Please sign in to comment.