Skip to content
This repository was archived by the owner on Sep 13, 2020. It is now read-only.

fixing rtl boundary layout #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ node_modules
.DS_Store
**/.DS_Store
.idea
build
*~
2 changes: 2 additions & 0 deletions build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import {
Dimensions,
Animated,
TouchableWithoutFeedback,
I18nManager,
} from 'react-native';
import PropTypes from 'prop-types';
import styles from './styles';
@@ -234,7 +235,7 @@ export default class SideMenu extends React.Component {
}

render(): React.Element<void, void> {
const boundryStyle = this.props.menuPosition === 'right' ?
const boundryStyle = ((this.props.menuPosition === 'left' && I18nManager.isRTL) || (this.props.menuPosition === 'right' && !I18nManager.isRTL)) ?
{ left: this.state.width - this.state.openMenuOffset } :
{ right: this.state.width - this.state.openMenuOffset };