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

added maxDraggingOffset property #215

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
bugfix
  • Loading branch information
Andrea Cresta committed Dec 8, 2016
commit dcb9c0718ae3e62e800d6bc6798cb25832a6ecc0
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -216,6 +216,7 @@ class SideMenu extends React.Component {

onLayoutChange(e) {
const { width, height, } = e.nativeEvent.layout;
const openOffsetMenuPercentage = openMenuOffset * width;
const openMenuOffset = width * this.state.openOffsetMenuPercentage;
const hiddenMenuOffset = width * this.state.hiddenMenuOffsetPercentage;
this.setState({ width, height, openMenuOffset, hiddenMenuOffset });