We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3c2b57 commit ecd102fCopy full SHA for ecd102f
src/index.tsx
@@ -240,8 +240,11 @@ function withDecaying(
240
[
241
stopClock(decayClock),
242
cond(eq(state, GestureState.BEGAN), set(prevent, 0)),
243
+ cond(
244
+ or(eq(state, GestureState.BEGAN), eq(state, GestureState.ACTIVE)),
245
+ set(wasStartedFromBegin, 0)
246
+ ),
247
cond(eq(state, GestureState.BEGAN), [
- set(wasStartedFromBegin, 0),
248
set(offset, sub(valDecayed, drag)),
249
]),
250
set(valDecayed, add(drag, offset)),
@@ -636,8 +639,7 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
636
639
throw new Error(`Invalid type for value ${s}: ${typeof s}`)
637
640
}
638
641
)
- .sort(({ val: a }, { val: b }) => (a < b ? 1 : 0))
-
642
+ .sort(({ val: a }, { val: b }) => b - a)
643
if (state && state.snapPoints) {
644
state.snapPoints.forEach((s, i) =>
645
s.setValue(sortedPropsSnapPints[0].val - sortedPropsSnapPints[i].val)
0 commit comments