Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2012-11-16 18:51:43 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:46:59 +0300
commit61477088e1d1518ae3114f19af544c0e7c1de840 (patch)
tree1776fcad1052b0acd26bc438160f67203bf430ef /iphone/Maps/Classes/EAGLView.mm
parent69b1a68976f74e5c3f07c57f9d875ff8f40bb94d (diff)
[ios] Fixed bug with rotation when bookmark is visible
Diffstat (limited to 'iphone/Maps/Classes/EAGLView.mm')
-rw-r--r--iphone/Maps/Classes/EAGLView.mm20
1 files changed, 20 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/EAGLView.mm b/iphone/Maps/Classes/EAGLView.mm
index a8f704e3e2..cacb544b5a 100644
--- a/iphone/Maps/Classes/EAGLView.mm
+++ b/iphone/Maps/Classes/EAGLView.mm
@@ -2,6 +2,7 @@
#import <OpenGLES/EAGLDrawable.h>
#import "EAGLView.h"
+#import "BalloonView.h"
#include "RenderBuffer.hpp"
#include "RenderContext.hpp"
@@ -20,6 +21,8 @@
@implementation EAGLView
+@synthesize balloonView;
+
// You must implement this method
+ (Class)layerClass
{
@@ -151,6 +154,9 @@
Framework & f = GetFramework();
if (f.NeedRedraw())
{
+ if (balloonView.isDisplayed)
+ [balloonView updatePosition:self atPoint:[self globalPoint2ViewPoint:balloonView.globalPosition]];
+
f.SetNeedRedraw(false);
f.BeginPaint(pe);
f.DoPaint(pe);
@@ -177,4 +183,18 @@
[super dealloc];
}
+- (CGPoint)viewPoint2GlobalPoint:(CGPoint)pt
+{
+ CGFloat const scaleFactor = self.contentScaleFactor;
+ m2::PointD const ptG = GetFramework().PtoG(m2::PointD(pt.x * scaleFactor, pt.y * scaleFactor));
+ return CGPointMake(ptG.x, ptG.y);
+}
+
+- (CGPoint)globalPoint2ViewPoint:(CGPoint)pt
+{
+ CGFloat const scaleFactor = self.contentScaleFactor;
+ m2::PointD const ptP = GetFramework().GtoP(m2::PointD(pt.x, pt.y));
+ return CGPointMake(ptP.x / scaleFactor, ptP.y / scaleFactor);
+}
+
@end