Authored by Thomas Rasch

o Bugfix: When constraining the map bounds, set the zoom factor after the call t…

…o scrollView:correctedContentSize: to prevent a loop
... ... @@ -30,10 +30,21 @@
- (void)setContentSize:(CGSize)contentSize
{
CGFloat factor = 1.0;
if (self.mapScrollViewDelegate)
{
CGSize previousContentSize = contentSize;
[self.mapScrollViewDelegate scrollView:self correctedContentSize:&contentSize];
factor = contentSize.width / previousContentSize.width;
}
[super setContentSize:contentSize];
if (factor != 1.0)
self.zoomScale *= factor;
}
@end
... ...
... ... @@ -1253,9 +1253,6 @@
else
factor = (projectedSize.height / _constrainingProjectedBounds.size.height);
// \bug: Move this to RMMapScrollView
aScrollView.zoomScale *= factor;
*aContentSize = CGSizeMake((*aContentSize).width * factor, (*aContentSize).height * factor);
}
... ...