Ignore sizing and positioning for hidden elements in assertions (#80)

This commit is contained in:
Christian Sturm
2021-05-07 08:35:45 +02:00
committed by GitHub
parent 8818a0c92e
commit a2db858090

View File

@@ -1040,13 +1040,13 @@ public:
[self updateAttributionAlertView];
MGLAssert(CGRectContainsRect(self.bounds, self.attributionButton.mgl_frameForIdentifyTransform),
MGLAssert(self.attributionButton.isHidden || CGRectContainsRect(self.bounds, self.attributionButton.mgl_frameForIdentifyTransform),
@"The attribution is not in the visible area of the mapview. Please check your position and offset settings");
MGLAssert(CGRectContainsRect(self.bounds, self.scaleBar.mgl_frameForIdentifyTransform),
MGLAssert(self.scaleBar.isHidden || CGRectContainsRect(self.bounds, self.scaleBar.mgl_frameForIdentifyTransform),
@"The scaleBar is not in the visible area of the mapview. Please check your position and offset settings");
MGLAssert(CGRectContainsRect(self.bounds, self.compassView.mgl_frameForIdentifyTransform),
MGLAssert(self.compassView.isHidden || CGRectContainsRect(self.bounds, self.compassView.mgl_frameForIdentifyTransform),
@"The compassView is not in the visible area of the mapview. Please check your position and offset settings");
MGLAssert(CGRectContainsRect(self.bounds, self.logoView.mgl_frameForIdentifyTransform),
MGLAssert(self.logoView.isHidden || CGRectContainsRect(self.bounds, self.logoView.mgl_frameForIdentifyTransform),
@"The logoView is not in the visible area of the mapview. Please check your position and offset settings");
}