Skip to content
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
7 changes: 4 additions & 3 deletions Classes/Popover/WEPopoverContainerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ - (void)determineGeometryForSize:(CGSize)theContentSize anchorRect:(CGRect)ancho
}
// If still going past right, resize width
if (theOffset.x + theSize.width > CGRectGetMaxX(displayArea)) {
shift = CGRectGetMaxX(displayArea) - (theOffset.x + theSize.width);
shift = theOffset.x + theSize.width - CGRectGetMaxX(displayArea);
theSize.width -= shift;
}
// If going past the bottom bounds, resize height
Expand Down Expand Up @@ -235,9 +235,10 @@ - (void)determineGeometryForSize:(CGSize)theContentSize anchorRect:(CGRect)ancho
xArrowOffset -= shift;
theOffset.x += shift;
}

// If still going past right, resize width
if (theOffset.x + theSize.width > CGRectGetMaxX(displayArea)) {
shift = CGRectGetMaxX(displayArea) - (theOffset.x + theSize.width);
shift = theOffset.x + theSize.width - CGRectGetMaxX(displayArea);
theSize.width -= shift;
}
// If going past the top bounds, resize height and shift offset
Expand Down Expand Up @@ -390,7 +391,7 @@ - (void)determineGeometryForSize:(CGSize)theContentSize anchorRect:(CGRect)ancho
arrowImage = rightArrowImage;
break;
}

NSAssert(!CGRectEqualToRect(bgRect, CGRectNull), @"bgRect is null");

}
Expand Down