Skip to content

Commit

Permalink
fix(PresentationControls): move cursor effect cleanup code to avoid o…
Browse files Browse the repository at this point in the history
…verriding disabled behavior (#1445)
  • Loading branch information
frankievx committed May 21, 2023
1 parent 21c93a4 commit 34d3c30
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/web/PresentationControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ export function PresentationControls({
if (global && cursor && enabled) {
explDomElement.style.cursor = 'grab'
gl.domElement.style.cursor = ''
}

return () => {
explDomElement.style.cursor = 'default'
gl.domElement.style.cursor = 'default'
return () => {
explDomElement.style.cursor = 'default'
gl.domElement.style.cursor = 'default'
}
}
}, [global, cursor, explDomElement, enabled])
const bind = useGesture(
Expand Down

1 comment on commit 34d3c30

@vercel
Copy link

@vercel vercel bot commented on 34d3c30 May 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.