Skip to content

Commit ecebb69

Browse files
committed
fix(ios): fixed getTargetContainer calculation
1 parent 7f92c3d commit ecebb69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/ios/Plugin/Map.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ public class Map {
180180

181181
let height = Double((item as? UIScrollView)?.contentSize.height ?? 0)
182182
let width = Double((item as? UIScrollView)?.contentSize.width ?? 0)
183-
let actualHeight = round(height / 2)
183+
let actualHeight = floor(height / 2)
184184

185-
let isWidthEqual = width == self.config.width
186-
let isHeightEqual = actualHeight == self.config.height
185+
let isWidthEqual = width == refWidth
186+
let isHeightEqual = actualHeight == refHeight
187187

188188
if isWidthEqual && isHeightEqual && item.tag < self.targetViewController?.tag ?? Map.MAP_TAG {
189189
return item

0 commit comments

Comments
 (0)