diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2019-05-28 19:00:20 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2019-05-28 19:00:20 -0700 |
commit | a43723d4dcd73f3ed71dffc373b98eed91d1c408 (patch) | |
tree | 576ca694663c0410f32c9499e3bde94e31cd4378 | |
parent | 9de634f801bde356e9205b363bf33564dbca8608 (diff) | |
download | qtlocation-mapboxgl-upstream/1ec5-center-offset-14664.tar.gz |
[macos] Specifying edge padding forces camera changeupstream/1ec5-center-offset-14664
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 77eb300aef..1f4730cc50 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1198,7 +1198,7 @@ public: }; } - if ([self.camera isEqualToMapCamera:camera]) { + if ([self.camera isEqualToMapCamera:camera] && NSEdgeInsetsEqual(edgePadding, NSEdgeInsetsZero)) { if (completion) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ completion(); @@ -1311,7 +1311,7 @@ public: } MGLMapCamera *camera = [self cameraForCameraOptions:cameraOptions]; - if ([self.camera isEqualToMapCamera:camera]) { + if ([self.camera isEqualToMapCamera:camera] && NSEdgeInsetsEqual(insets, NSEdgeInsetsZero)) { return; } |