diff --git a/src/views/Header/Header.js b/src/views/Header/Header.js index 9f31bd4..2319ec6 100644 --- a/src/views/Header/Header.js +++ b/src/views/Header/Header.js @@ -7,6 +7,7 @@ import { Platform, StyleSheet, View, + I18nManager, ViewPropTypes, } from 'react-native'; import { MaskedViewIOS } from '../../PlatformHelpers'; @@ -565,6 +566,7 @@ const styles = StyleSheet.create({ marginTop: -0.5, // resizes down to 20.5 alignSelf: 'center', resizeMode: 'contain', + transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }], }, title: { bottom: 0, diff --git a/src/views/StackView/StackViewLayout.js b/src/views/StackView/StackViewLayout.js index 60de243..76f9d41 100644 --- a/src/views/StackView/StackViewLayout.js +++ b/src/views/StackView/StackViewLayout.js @@ -227,8 +227,12 @@ class StackViewLayout extends React.Component { const { index } = navigation.state; const isVertical = mode === 'modal'; const { options } = scene.descriptor; + const gestureDirection = options.gestureDirection; - const gestureDirectionInverted = options.gestureDirection === 'inverted'; + const gestureDirectionInverted = + typeof gestureDirection === 'string' + ? gestureDirection === 'inverted' + : I18nManager.isRTL; const gesturesEnabled = typeof options.gesturesEnabled === 'boolean' @@ -302,7 +306,7 @@ class StackViewLayout extends React.Component { ? layout.height.__getValue() : layout.width.__getValue(); const currentValue = - (I18nManager.isRTL && axis === 'dx') !== gestureDirectionInverted + axis === 'dx' && gestureDirectionInverted ? startValue + gesture[axis] / axisDistance : startValue - gesture[axis] / axisDistance; const value = clamp(index - 1, currentValue, index);