@@ -136,35 +136,23 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
136
136
const auto &oldViewProps = static_cast <const RNMBXMapViewProps &>(*oldProps);
137
137
const auto &newViewProps = static_cast <const RNMBXMapViewProps &>(*props);
138
138
139
- id attributionEnabled = RNMBXConvertFollyDynamicToId (newViewProps.attributionEnabled );
140
- if (attributionEnabled != nil ) {
141
- _view.reactAttributionEnabled = attributionEnabled;
142
- }
139
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (attributionEnabled, reactAttributionEnabled)
143
140
144
141
id attributionPosition = RNMBXConvertFollyDynamicToId (newViewProps.attributionPosition );
145
142
if (attributionPosition != nil ) {
146
143
_view.reactAttributionPosition = attributionPosition;
147
144
}
148
145
149
- id logoEnabled = RNMBXConvertFollyDynamicToId (newViewProps.logoEnabled );
150
- if (logoEnabled != nil ) {
151
- _view.reactLogoEnabled = logoEnabled;
152
- }
146
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (logoEnabled, reactLogoEnabled)
153
147
154
148
id logoPosition = RNMBXConvertFollyDynamicToId (newViewProps.logoPosition );
155
149
if (logoPosition != nil ) {
156
150
_view.reactLogoPosition = logoPosition;
157
151
}
158
152
159
- id compassEnabled = RNMBXConvertFollyDynamicToId (newViewProps.compassEnabled );
160
- if (compassEnabled != nil ) {
161
- _view.reactCompassEnabled = compassEnabled;
162
- }
153
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (compassEnabled, reactCompassEnabled)
163
154
164
- id compassFadeWhenNorth = RNMBXConvertFollyDynamicToId (newViewProps.compassFadeWhenNorth );
165
- if (compassFadeWhenNorth != nil ) {
166
- _view.reactCompassFadeWhenNorth = compassFadeWhenNorth;
167
- }
155
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (compassFadeWhenNorth, reactCompassFadeWhenNorth)
168
156
169
157
id compassPosition = RNMBXConvertFollyDynamicToId (newViewProps.compassPosition );
170
158
if (compassPosition != nil ) {
@@ -194,25 +182,13 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
194
182
_view.reactScaleBarPosition = scaleBarPosition;
195
183
}
196
184
197
- id zoomEnabled = RNMBXConvertFollyDynamicToId (newViewProps.zoomEnabled );
198
- if (zoomEnabled != nil ) {
199
- _view.reactZoomEnabled = zoomEnabled;
200
- }
185
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (zoomEnabled, reactZoomEnabled)
201
186
202
- id scrollEnabled = RNMBXConvertFollyDynamicToId (newViewProps.scrollEnabled );
203
- if (scrollEnabled != nil ) {
204
- _view.reactScrollEnabled = scrollEnabled;
205
- }
206
-
207
- id rotateEnabled = RNMBXConvertFollyDynamicToId (newViewProps.rotateEnabled );
208
- if (rotateEnabled != nil ) {
209
- _view.reactRotateEnabled = rotateEnabled;
210
- }
187
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (scrollEnabled, reactScrollEnabled)
211
188
212
- id pitchEnabled = RNMBXConvertFollyDynamicToId (newViewProps.pitchEnabled );
213
- if (pitchEnabled != nil ) {
214
- _view.reactPitchEnabled = pitchEnabled;
215
- }
189
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (rotateEnabled, reactRotateEnabled)
190
+
191
+ RNMBX_REMAP_OPTIONAL_PROP_BOOL (pitchEnabled, reactPitchEnabled)
216
192
217
193
id projection = RNMBXConvertFollyDynamicToId (newViewProps.projection );
218
194
if (projection != nil ) {
0 commit comments