Skip to content

Commit

Permalink
Potential fix for #1
Browse files Browse the repository at this point in the history
  • Loading branch information
kcharwood committed May 9, 2013
1 parent 3ba3022 commit f7599f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions MMDrawerController/MMDrawerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,8 @@ -(void)resetDrawerVisualStateForDrawerSide:(MMDrawerSide)drawerSide{
-(CGFloat)roundedOriginXForDrawerConstriants:(CGFloat)originX{

if (originX < -self.maximumRightDrawerWidth) {
if (self.shouldStretchDrawer) {
if (self.shouldStretchDrawer &&
self.rightDrawerViewController) {
CGFloat maxOvershoot = (CGRectGetWidth(self.centerContainerView.frame)-self.maximumRightDrawerWidth)*MMDrawerOvershootPercentage;
return originXForDrawerOriginAndTargetOriginOffset(originX, -self.maximumRightDrawerWidth, maxOvershoot);
}
Expand All @@ -765,7 +766,8 @@ -(CGFloat)roundedOriginXForDrawerConstriants:(CGFloat)originX{
}
}
else if(originX > self.maximumLeftDrawerWidth){
if (self.shouldStretchDrawer) {
if (self.shouldStretchDrawer &&
self.leftDrawerViewController) {
CGFloat maxOvershoot = (CGRectGetWidth(self.centerContainerView.frame)-self.maximumLeftDrawerWidth)*MMDrawerOvershootPercentage;
return originXForDrawerOriginAndTargetOriginOffset(originX, self.maximumLeftDrawerWidth, maxOvershoot);
}
Expand Down

0 comments on commit f7599f2

Please sign in to comment.