Skip to content

Commit

Permalink
Updated the vh and vw variables in the position function to account f…
Browse files Browse the repository at this point in the history
…or any scrollbars.
  • Loading branch information
wickerdad committed Jul 5, 2024
1 parent c0c60bd commit 814abf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/tulip.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function tulip(element, delay = 300, transition = 150, distance = 15) {


function position(tulip, wrap, distance) {
const vh = window.innerHeight;
const vw = window.innerWidth;
const vh = window.innerHeight - document.documentElement.clientHeight;
const vw = window.innerWidth - document.documentElement.clientWidth;
const tipPos = tulip.getBoundingClientRect();
const tipHalfWidth = tipPos.width / 2;
const textPos = wrap.getBoundingClientRect();
Expand Down
2 changes: 1 addition & 1 deletion src/tulip.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 814abf4

Please sign in to comment.