File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,6 +295,7 @@ function ProgressRope({ scrollYProgress, color }) {
295295
296296 const handlePointerUp = useCallback ( ( ) => {
297297 if ( snapped . current && tugMaxY . current > TUG_THRESHOLD ) {
298+ new Audio ( "/sounds/switch.mp3" ) . play ( ) . catch ( ( ) => { } ) ;
298299 const font = RANDOM_FONTS [ Math . floor ( Math . random ( ) * RANDOM_FONTS . length ) ] ;
299300 const bg = RANDOM_COLORS [ Math . floor ( Math . random ( ) * RANDOM_COLORS . length ) ] ;
300301 let chaosStyle = document . getElementById ( "rope-chaos" ) ;
@@ -334,6 +335,7 @@ function ProgressRope({ scrollYProgress, color }) {
334335 height : "100vh" ,
335336 zIndex : 9999 ,
336337 pointerEvents : dragging ? "auto" : "none" ,
338+ touchAction : dragging ? "none" : "auto" ,
337339 } }
338340 onPointerMove = { handlePointerMove }
339341 onPointerUp = { handlePointerUp }
@@ -344,7 +346,7 @@ function ProgressRope({ scrollYProgress, color }) {
344346 stroke = "transparent"
345347 strokeWidth = "24"
346348 fill = "none"
347- style = { { pointerEvents : "auto" , cursor : "grab" } }
349+ style = { { pointerEvents : "auto" , cursor : "grab" , touchAction : "none" } }
348350 onPointerDown = { handlePointerDown }
349351 />
350352 { segments . map ( ( seg , i ) => (
You can’t perform that action at this time.
0 commit comments