diff options
author | Eimantas Vaiciunas <eimantas@walkingsmarts.com> | 2017-03-08 09:14:18 +0200 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2017-05-26 15:26:54 -0700 |
commit | 9c23d03b2c6d51240834a898a3f38b17c5d7b7a4 (patch) | |
tree | 51cb8fbcda9c1c34cefb6ae2c18dca719a1ed44b | |
parent | 0fc6f4f57b9e7a2c304e6a457b8b0d7d73e70f7a (diff) | |
download | qtlocation-mapboxgl-9c23d03b2c6d51240834a898a3f38b17c5d7b7a4.tar.gz |
Rename `rotatesWithMap` to `rotatesToMatchCamera`
-rw-r--r-- | platform/ios/src/MGLAnnotationView.h | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLAnnotationView.mm | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h index 4956d81ba3..942a1fde2c 100644 --- a/platform/ios/src/MGLAnnotationView.h +++ b/platform/ios/src/MGLAnnotationView.h @@ -182,7 +182,7 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationViewDragState) { The default value of this property is `NO`. Set this property to `YES` if the view’s rotation is important. */ -@property (nonatomic, assign) BOOL rotatesWithMap; +@property (nonatomic, assign) BOOL rotatesToMatchCamera; #pragma mark Managing the Selection State diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm index 02e3d96e08..74d3908077 100644 --- a/platform/ios/src/MGLAnnotationView.mm +++ b/platform/ios/src/MGLAnnotationView.mm @@ -54,7 +54,7 @@ _annotation = [decoder decodeObjectOfClass:[NSObject class] forKey:@"annotation"]; _centerOffset = [decoder decodeCGVectorForKey:@"centerOffset"]; _scalesWithViewingDistance = [decoder decodeBoolForKey:@"scalesWithViewingDistance"]; - _rotatesWithMap = [decoder decodeBoolForKey:@"rotatesWithMap"]; + _rotatesToMatchCamera = [decoder decodeBoolForKey:@"rotatesToMatchCamera"]; _selected = [decoder decodeBoolForKey:@"selected"]; _enabled = [decoder decodeBoolForKey:@"enabled"]; self.draggable = [decoder decodeBoolForKey:@"draggable"]; @@ -68,7 +68,7 @@ [coder encodeObject:_annotation forKey:@"annotation"]; [coder encodeCGVector:_centerOffset forKey:@"centerOffset"]; [coder encodeBool:_scalesWithViewingDistance forKey:@"scalesWithViewingDistance"]; - [coder encodeBool:_rotatesWithMap forKey:@"rotatesWithMap"]; + [coder encodeBool:_rotatesToMatchCamera forKey:@"rotatesToMatchCamera"]; [coder encodeBool:_selected forKey:@"selected"]; [coder encodeBool:_enabled forKey:@"enabled"]; [coder encodeBool:_draggable forKey:@"draggable"]; @@ -160,18 +160,18 @@ } } -- (void)setRotatesWithMap:(BOOL)rotatesWithMap +- (void)setRotatesToMatchCamera:(BOOL)rotatesToMatchCamera { - if (_rotatesWithMap != rotatesWithMap) + if (_rotatesToMatchCamera != rotatesToMatchCamera) { - _rotatesWithMap = rotatesWithMap; + _rotatesToMatchCamera = rotatesToMatchCamera; [self updateRotateTransform]; } } - (void)updateRotateTransform { - if (self.rotatesWithMap == NO) return; + if (self.rotatesToMatchCamera == NO) return; CATransform3D undoOfLastRotateTransform = CATransform3DInvert(_lastAppliedRotateTransform); |