Skip to content

Commit

Permalink
hotfix drag scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Nov 5, 2024
1 parent b5fe6bd commit 5b2848b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions examples/market/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ import { Sidebar } from './components/sidebar.js'
import { playlists } from './data/playlists.js'
import { Menu } from './components/menu.js'
import { create } from 'zustand'
import { noEvents, PointerEvents } from '@react-three/xr'

export default function App() {
return (
<>
<FrameCounter />
<Canvas
flat
events={noEvents}
frameloop="demand"
camera={{ position: [0, 0, 18], fov: 35 }}
style={{ height: '100dvh', touchAction: 'none' }}
gl={{ localClippingEnabled: true }}
>
<PointerEvents />
<CountFrames />
{/*<Root backgroundColor={0xffffff} sizeX={8.34} sizeY={5.58} pixelSize={0.01}>
<Defaults>
Expand Down
4 changes: 2 additions & 2 deletions packages/uikit/src/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ export function computedScrollHandlers(
event.nativeEvent.pointerType === 'mouse'

const scrollbarAxisIndex = ponterIsMouse
? undefined
: getIntersectedScrollbarIndex(
? getIntersectedScrollbarIndex(
localPoint,
root.pixelSize.peek(),
scrollbarWidth.peek(),
Expand All @@ -222,6 +221,7 @@ export function computedScrollHandlers(
nodeState.borderInset.peek(),
scrollPosition.peek(),
)
: undefined

if (ponterIsMouse && scrollbarAxisIndex == null) {
return
Expand Down

0 comments on commit 5b2848b

Please sign in to comment.