@rnmapbox/maps 10.2.4 → 10.2.5

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.
@@ -11,6 +11,8 @@
11
11
  #import <react/renderer/components/rnmapbox_maps_specs/Props.h>
12
12
  #import <react/renderer/components/rnmapbox_maps_specs/RCTComponentViewHelpers.h>
13
13
 
14
+ #import "RNMBXFabricPropConvert.h"
15
+
14
16
  using namespace facebook::react;
15
17
 
16
18
  @interface RNMBXPointAnnotationComponentView () <RCTRNMBXPointAnnotationViewProtocol>
@@ -40,9 +42,9 @@ using namespace facebook::react;
40
42
  - (void)prepareView
41
43
  {
42
44
  _view = [[RNMBXPointAnnotation alloc] init];
43
-
45
+
44
46
  self.contentView = _view;
45
-
47
+
46
48
  // capture weak self reference to prevent retain cycle
47
49
  __weak __typeof__(self) weakSelf = self;
48
50
 
@@ -122,24 +124,14 @@ using namespace facebook::react;
122
124
 
123
125
  - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps
124
126
  {
125
- const auto &newProps = static_cast<const RNMBXPointAnnotationProps &>(*props);
126
- id coordinate = RNMBXConvertFollyDynamicToId(newProps.coordinate);
127
- if (coordinate != nil) {
128
- _view.coordinate = coordinate;
129
- }
130
- id draggable = RNMBXConvertFollyDynamicToId(newProps.draggable);
131
- if (draggable != nil) {
132
- _view.draggable = draggable;
133
- }
134
- id idx = RNMBXConvertFollyDynamicToId(newProps.id);
135
- if (idx != nil) {
136
- _view.id = idx;
137
- }
138
- id anchor = RNMBXConvertFollyDynamicToId(newProps.anchor);
139
- if (anchor != nil) {
140
- _view.anchor = anchor;
141
- }
142
-
127
+ const auto &oldViewProps = static_cast<const RNMBXPointAnnotationProps &>(*oldProps);
128
+ const auto &newViewProps = static_cast<const RNMBXPointAnnotationProps &>(*props);
129
+
130
+ RNMBX_OPTIONAL_PROP_NSString(coordinate)
131
+ RNMBX_OPTIONAL_PROP_BOOL(draggable)
132
+ RNMBX_OPTIONAL_PROP_NSString(id)
133
+ RNMBX_OPTIONAL_PROP_NSDictionary(anchor)
134
+
143
135
  [super updateProps:props oldProps:oldProps];
144
136
  }
145
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
- "version": "10.2.4",
3
+ "version": "10.2.5",
4
4
  "description": "Community-supported, open-source React Native library for building maps using Mapbox native maps SDK for iOS and Android",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.native.d.ts",