[ios] Content insets border case fix and comment.

Allows changing camera when user duplicates content insets.

Related to previous patch and comment:
https://github.com/mapbox/mapbox-gl-native/pull/14664#pullrequestreview-243004376
Thanks @1ec5
This commit is contained in:
Aleksandar Stojiljkovic
2019-05-29 13:36:47 +03:00
parent 62f6338d5b
commit 1637a4b694

View File

@@ -3429,9 +3429,12 @@ public:
});
};
}
// Padding is baked in adjusted camera center (in cameraForLatLngs) and
// cameraOptions.padding at this point is (0, 0, 0, 0) and we don't need to
// check if cameraOptions.contentInsets are equal to contentInsets.
MGLMapCamera *camera = [self cameraForCameraOptions:cameraOptions];
if ([self.camera isEqualToMapCamera:camera] && UIEdgeInsetsEqualToEdgeInsets(_contentInset, insets))
if ([self.camera isEqualToMapCamera:camera])
{
if (completion)
{