Skip to content

Commit ca4881e

Browse files
Merge branch 'main' into fix/RMET-4420/crash-optional-value
2 parents c07dca3 + 116e8a3 commit ca4881e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugin/ios/Plugin/Map.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,11 @@ public class Map {
217217

218218
let height = Double((item as? UIScrollView)?.contentSize.height ?? 0)
219219
let width = Double((item as? UIScrollView)?.contentSize.width ?? 0)
220-
let actualHeight = round(height / 2)
220+
let actualHeightFloor = floor(height / 2)
221+
let actualHeightCeil = ceil(height / 2)
221222

222-
let isWidthEqual = width == self.config.width
223-
let isHeightEqual = actualHeight == self.config.height
223+
let isWidthEqual = width == refWidth
224+
let isHeightEqual = actualHeightFloor == refHeight || actualHeightCeil == refHeight
224225

225226
if isWidthEqual && isHeightEqual && item.tag < self.targetViewController?.tag ?? Map.MAP_TAG {
226227
return item

0 commit comments

Comments
 (0)