Skip to content

Commit

Permalink
chore: 复原scroll-view
Browse files Browse the repository at this point in the history
  • Loading branch information
lareinayanyu committed Nov 5, 2024
1 parent 88ceef0 commit b2dd08b
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,22 +252,12 @@ const _ScrollView = forwardRef<HandlerRef<ScrollView & View, ScrollViewProps>, S
}

function onContentSizeChange (width: number, height: number) {
scrollOptions.current = extendObject(
scrollOptions.current,
{
contentLength: selectLength({ height, width })
}
)
scrollOptions.current.contentLength = selectLength({ height, width })
}

function onLayout (e: LayoutChangeEvent) {
const layout = e.nativeEvent.layout || {}
scrollOptions.current = extendObject(
scrollOptions.current,
{
visibleLength: selectLength(layout)
}
)
scrollOptions.current.visibleLength = selectLength(layout)
}

function updateScrollOptions (e: NativeSyntheticEvent<NativeScrollEvent>, position: Record<string, any>) {
Expand Down

0 comments on commit b2dd08b

Please sign in to comment.