diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2019-01-22 15:42:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-22 15:42:28 -0800 |
commit | ca129e0c79c60db57c7ad3144aad3f4293dab8cd (patch) | |
tree | 05a70518818bff547225ef629e9a9c695af906ea /platform/macos | |
parent | b460efdf00092797446570389a6c9afa230da162 (diff) | |
download | qtlocation-mapboxgl-ca129e0c79c60db57c7ad3144aad3f4293dab8cd.tar.gz |
[ios, macos] MGLMapView logging improvements. (#13776)
Added NSEdgeInsets to NSString function to improve the debugging on macOS.
Added debug logs to MGLMapView.
Diffstat (limited to 'platform/macos')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 56e768584d..482333a26c 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1389,14 +1389,16 @@ public: } - (void)setContentInsets:(NSEdgeInsets)contentInsets { + MGLLogDebug(@"Setting contentInset: %@", MGLStringFromNSEdgeInsets(contentInsets)); [self setContentInsets:contentInsets animated:NO]; } - (void)setContentInsets:(NSEdgeInsets)contentInsets animated:(BOOL)animated { + if (NSEdgeInsetsEqual(contentInsets, self.contentInsets)) { return; } - + MGLLogDebug(@"Setting contentInset: %@ animated:", MGLStringFromNSEdgeInsets(contentInsets), MGLStringFromBOOL(animated)); // After adjusting the content insets, move the center coordinate from the // old frame of reference to the new one represented by the newly set // content insets. |