@rnmapbox/maps 10.1.1 → 10.1.2

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.
@@ -273,6 +273,7 @@ open class RNMBXMapView: UIView {
273
273
  case scaleBar
274
274
  case onLongPress
275
275
  case onPress
276
+ case zoomEnabled
276
277
  case scrollEnabled
277
278
  case rotateEnabled
278
279
  case pitchEnabled
@@ -298,6 +299,8 @@ open class RNMBXMapView: UIView {
298
299
  map.applyOnLongPress()
299
300
  case .onPress:
300
301
  map.applyOnPress()
302
+ case .zoomEnabled:
303
+ map.applyZoomEnabled()
301
304
  case .scrollEnabled:
302
305
  map.applyScrollEnabled()
303
306
  case .rotateEnabled:
@@ -661,10 +664,18 @@ open class RNMBXMapView: UIView {
661
664
  changes.apply(self)
662
665
  }
663
666
 
667
+ var zoomEnabled: Bool? = nil
664
668
  @objc public func setReactZoomEnabled(_ value: Bool) {
665
- self.mapView.gestures.options.quickZoomEnabled = value
666
- self.mapView.gestures.options.doubleTapToZoomInEnabled = value
667
- self.mapView.gestures.options.pinchZoomEnabled = value
669
+ self.zoomEnabled = value
670
+ changed(.zoomEnabled)
671
+ }
672
+
673
+ func applyZoomEnabled() {
674
+ if let value = zoomEnabled {
675
+ self.mapView.gestures.options.quickZoomEnabled = value
676
+ self.mapView.gestures.options.doubleTapToZoomInEnabled = value
677
+ self.mapView.gestures.options.pinchZoomEnabled = value
678
+ }
668
679
  }
669
680
 
670
681
  var scrollEnabled: Bool? = nil
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.1.1",
4
+ "version": "10.1.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },