Skip to content

Commit

Permalink
Merge pull request #97 from dohooo/fix/normal-layout
Browse files Browse the repository at this point in the history
fix: remove ExtrapolateParameter of normal layout translate
  • Loading branch information
dohooo authored Jan 11, 2022
2 parents aeaa56a + 850e960 commit af33488
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/layouts/normal.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { Extrapolate, interpolate } from 'react-native-reanimated';
import { interpolate } from 'react-native-reanimated';

export function normalLayout(opts: { size: number; vertical: boolean }) {
const { size, vertical } = opts;

return (value: number) => {
'worklet';
const translate = interpolate(
value,
[-1, 0, 1],
[-size, 0, size],
Extrapolate.CLAMP
);
const translate = interpolate(value, [-1, 0, 1], [-size, 0, size]);

return {
transform: [
Expand Down

0 comments on commit af33488

Please sign in to comment.