You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Regardless of position, position increments as 1 and starts at 0.5, so 1.5, 2.5, 3.5 etc. Will track to -0.5 before pos value is set to none (when mouse is slightly just above the element).
To Reproduce
Steps to reproduce the behavior:
Setup a div as specified in the instructions. Add <p>x: {mouse.x} y: {mouse.y}</p> to display pos within element.
Start from the top
Move mouse down the tracked div.
Reverse steps.
Expected behavior
y is not offset by 0.5 and that the numbers either freeze (preferably freeze) or not displayed when pos is exactly 0.
Screenshots
Desktop (please complete the following information):
OS: Windows 10
Browser: Brave
Version: 1.42.97
Additional context
Done with Next.JS and on a styled-component element. Not sure that this would be a cause though.
The text was updated successfully, but these errors were encountered:
c0dezer019
changed the title
mouse.y is off by 0.5 and shows as -0.5 when at the very top of the tracked element
[useMouse()] mouse.y is off by 0.5 and shows as -0.5 when at the very top of the tracked element
Aug 29, 2022
Describe the bug
Regardless of position, position increments as 1 and starts at 0.5, so 1.5, 2.5, 3.5 etc. Will track to -0.5 before pos value is set to none (when mouse is slightly just above the element).
To Reproduce
Steps to reproduce the behavior:
<p>x: {mouse.x} y: {mouse.y}</p>
to display pos within element.Expected behavior
y is not offset by 0.5 and that the numbers either freeze (preferably freeze) or not displayed when pos is exactly 0.
Screenshots
Desktop (please complete the following information):
Additional context
Done with Next.JS and on a styled-component element. Not sure that this would be a cause though.
The text was updated successfully, but these errors were encountered: