(left: JSONObject, right: JSONObject)
| 1696 | } |
| 1697 | |
| 1698 | function rectOverlapArea(left: JSONObject, right: JSONObject): number { |
| 1699 | const x1 = Math.max(rectNumber(left, "x"), rectNumber(right, "x")); |
| 1700 | const y1 = Math.max(rectNumber(left, "y"), rectNumber(right, "y")); |
| 1701 | const x2 = Math.min( |
| 1702 | rectNumber(left, "x") + rectNumber(left, "width"), |
| 1703 | rectNumber(right, "x") + rectNumber(right, "width"), |
| 1704 | ); |
| 1705 | const y2 = Math.min( |
| 1706 | rectNumber(left, "y") + rectNumber(left, "height"), |
| 1707 | rectNumber(right, "y") + rectNumber(right, "height"), |
| 1708 | ); |
| 1709 | return Math.max(0, x2 - x1) * Math.max(0, y2 - y1); |
| 1710 | } |
| 1711 | |
| 1712 | function tabBarControlLabel(control: any): string { |
| 1713 | const accessibility = accessibilityInfo(control); |
no test coverage detected