Skip to content

Commit

Permalink
fix(ios): fixed getTargetContainer calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Jan committed Jun 19, 2024
1 parent 7f92c3d commit 8536bb2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin/ios/Plugin/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ public class Map {

let height = Double((item as? UIScrollView)?.contentSize.height ?? 0)
let width = Double((item as? UIScrollView)?.contentSize.width ?? 0)
let actualHeight = round(height / 2)
let actualHeightFloor = floor(height / 2)
let actualHeightCeil = ceil(height / 2)

let isWidthEqual = width == self.config.width
let isHeightEqual = actualHeight == self.config.height
let isWidthEqual = width == refWidth
let isHeightEqual = actualHeightFloor == refHeight || actualHeightCeil == refHeight

if isWidthEqual && isHeightEqual && item.tag < self.targetViewController?.tag ?? Map.MAP_TAG {
return item
Expand Down

0 comments on commit 8536bb2

Please sign in to comment.