File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ function onDrag(event: PointerEvent) {
431431
432432 const opacityValue = 1 - percentageDragged ;
433433
434- if (shouldFade || (fadeFromIndex && activeSnapPointIndex .value === fadeFromIndex - 1 )) {
434+ if (shouldFade . value || (fadeFromIndex && activeSnapPointIndex .value === fadeFromIndex - 1 )) {
435435 onDragProp ?.(event , percentageDragged );
436436
437437 set (
Original file line number Diff line number Diff line change @@ -69,13 +69,14 @@ export function useSnapPoints({
6969
7070 const activeSnapPointIndex = computed ( ( ) => snapPoints ?. findIndex ( ( snapPoint ) => snapPoint === activeSnapPoint . value ) ?? null )
7171
72- const shouldFade =
72+ const shouldFade = computed ( ( ) => (
7373 ( snapPoints &&
7474 snapPoints . length > 0 &&
7575 ( fadeFromIndex || fadeFromIndex === 0 ) &&
7676 ! Number . isNaN ( fadeFromIndex ) &&
7777 snapPoints [ fadeFromIndex ] === activeSnapPoint . value
78- ) || ! snapPoints
78+ ) || ! snapPoints )
79+ )
7980
8081 const snapPointsOffset = computed ( ( ) => {
8182 const containerSize = typeof window !== 'undefined'
@@ -259,7 +260,7 @@ export function useSnapPoints({
259260
260261 // Don't animate, but still use this one if we are dragging away from the overlaySnapPoint
261262 if ( isOverlaySnapPoint && ! isDraggingDown ) return 1 ;
262- if ( ! shouldFade && ! isOverlaySnapPoint ) return null ;
263+ if ( ! shouldFade . value && ! isOverlaySnapPoint ) return null ;
263264
264265 // Either fadeFrom index or the one before
265266 const targetSnapPointIndex = isOverlaySnapPoint ? activeSnapPointIndex . value + 1 : activeSnapPointIndex . value - 1 ;
You can’t perform that action at this time.
0 commit comments