Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(overview-user-stories): fix the spotlight doesn't move on page scroll #75

Conversation

CatsJuice
Copy link
Member

description

I found that the previous implementation using useMouseInElement is not working due to vueuse's internal bug (this issue).

Instead of using useMouseInElement directly, we can use useElementBounding and useMouse together.

By the way, I've removed some code that is unnecessary in this file. If there's something I haven't considered, please point it out or close this pr.

:)

compare

  • before
CleanShot.2023-07-19.at.23.45.18.mp4
  • after
CleanShot.2023-07-19.at.23.42.41.mp4

@vercel
Copy link

vercel bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
affine-pro ✅ Ready (Inspect) Visit Preview Jul 19, 2023 3:58pm

@CatsJuice CatsJuice changed the title fix(overview-user-stories): fix the spotlight does't move on page scroll fix(overview-user-stories): fix the spotlight doesn't move on page scroll Jul 19, 2023
@SuneBear
Copy link
Collaborator

Very nice polish, the previous impl didn't combine with scrolling so it looked weird. useElementBounding + useMouse is very suitable to use on this effect, thanks a lot : )

@SuneBear SuneBear merged commit 112518f into toeverything:production Jul 21, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants