capacitor-google-navigation 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,15 @@ import UIKit
2
2
  import GoogleMaps
3
3
  import GoogleNavigation
4
4
 
5
+ /// A transparent view that passes touches through to underlying windows,
6
+ /// only intercepting touches that land on one of its subviews (e.g. the close button).
7
+ private class PassthroughView: UIView {
8
+ override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
9
+ let hit = super.hitTest(point, with: event)
10
+ return hit == self ? nil : hit
11
+ }
12
+ }
13
+
5
14
  class NavigationMapViewController: UIViewController {
6
15
  private let session: GMSNavigationSession
7
16
  private var mapView: GMSMapView?
@@ -60,7 +69,9 @@ class NavigationMapViewController: UIViewController {
60
69
  window.isHidden = false
61
70
 
62
71
  let overlayVC = UIViewController()
63
- overlayVC.view.backgroundColor = .clear
72
+ let passthroughView = PassthroughView()
73
+ passthroughView.backgroundColor = .clear
74
+ overlayVC.view = passthroughView
64
75
  window.rootViewController = overlayVC
65
76
 
66
77
  let button = UIButton(type: .system)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-google-navigation",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Google maps turn by turn navigation for capcitor",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",