Skip to content

Commit

Permalink
fix: handling vertical gesture in RTL (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
osdnk committed Oct 5, 2019
1 parent 615b523 commit a27ade8
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/stack/src/views/Stack/Card.tsx
Expand Up @@ -478,14 +478,15 @@ export default class Card extends React.Component<Props> {
);

private exec = [
cond(
eq(this.direction, DIRECTION_HORIZONTAL),
set(
this.gesture,
set(
this.gesture,
cond(
eq(this.direction, DIRECTION_HORIZONTAL),
multiply(
this.gestureUntraversed,
I18nManager.isRTL ? MINUS_ONE_NODE : TRUE_NODE
)
),
this.gestureUntraversed
)
),
set(
Expand Down Expand Up @@ -580,9 +581,13 @@ export default class Card extends React.Component<Props> {
cond(
this.distance,
divide(
multiply(
this.gestureUntraversed,
I18nManager.isRTL ? MINUS_ONE_NODE : TRUE_NODE
cond(
eq(this.direction, DIRECTION_HORIZONTAL),
multiply(
this.gestureUntraversed,
I18nManager.isRTL ? MINUS_ONE_NODE : TRUE_NODE
),
this.gestureUntraversed
),
this.distance
),
Expand Down

0 comments on commit a27ade8

Please sign in to comment.