ordering-ui-react-native 0.23.75-test → 0.23.75-test2
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.
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
48
48
|
const ASPECT_RATIO = useMemo(() => {
|
|
49
49
|
if (typeof width !== 'number' || typeof height !== 'number' || height === 0) {
|
|
50
50
|
console.error('Invalid screen dimensions');
|
|
51
|
-
return .3 // Valor predeterminado o manejo de error
|
|
51
|
+
return 0.3 // Valor predeterminado o manejo de error
|
|
52
52
|
}
|
|
53
53
|
return width / height;
|
|
54
54
|
}, [width, height])
|
|
@@ -60,7 +60,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
const fitCoordinates = (location?: any) => {
|
|
64
64
|
if (mapRef.current && typeof location.latitude === 'number' && !Number.isNaN(location.latitude) && typeof location.longitude === 'number' && !Number.isNaN(location.longitude)) {
|
|
65
65
|
const isSendCoordinates =
|
|
66
66
|
location &&
|
|
@@ -82,7 +82,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
82
82
|
},
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
|
-
};
|
|
85
|
+
};
|
|
86
86
|
|
|
87
87
|
const onPressZoomIn = () => {
|
|
88
88
|
const lastRegion = mapRef?.current?.__lastRegion
|
|
@@ -102,9 +102,9 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
102
102
|
})
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
useEffect(() => {
|
|
106
106
|
fitCoordinates(locationSelected || userLocation);
|
|
107
|
-
}, [userLocation, locationSelected]);
|
|
107
|
+
}, [userLocation, locationSelected]);
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
useEffect(() => {
|
|
@@ -277,7 +277,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
277
277
|
zoomControlEnabled
|
|
278
278
|
cacheEnabled
|
|
279
279
|
moveOnMarkerPress
|
|
280
|
-
|
|
280
|
+
/* onTouchStart={() => (following.current = false)} */
|
|
281
281
|
>
|
|
282
282
|
<>
|
|
283
283
|
{Object.values(markerGroups).length ? (Object.values(markerGroups).map((marker: any) => (
|
|
@@ -286,7 +286,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
286
286
|
marker={marker[0]}
|
|
287
287
|
orderIds={marker.map((order: any) => order.id).join(', ')}
|
|
288
288
|
/>
|
|
289
|
-
))) :
|
|
289
|
+
))) : ''}
|
|
290
290
|
{Object.values(customerMarkerGroups).length ? (Object.values(customerMarkerGroups).map((marker: any) => (
|
|
291
291
|
<RenderMarker
|
|
292
292
|
key={marker[0]?.customer_id}
|
|
@@ -294,7 +294,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
294
294
|
orderIds={marker.map((order: any) => order.id).join(', ')}
|
|
295
295
|
customer
|
|
296
296
|
/>
|
|
297
|
-
))) :
|
|
297
|
+
))) : ''}
|
|
298
298
|
{typeof location.lat === 'number' && !Number.isNaN(location.lat) && typeof location.lng === 'number' && !Number.isNaN(location.lng) ? (
|
|
299
299
|
<Marker
|
|
300
300
|
coordinate={{
|
|
@@ -317,7 +317,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
317
317
|
/>
|
|
318
318
|
</View>
|
|
319
319
|
</Marker>
|
|
320
|
-
) :
|
|
320
|
+
) : ''}
|
|
321
321
|
</>
|
|
322
322
|
</MapView>
|
|
323
323
|
<OFab
|
|
@@ -333,7 +333,13 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
333
333
|
<OFab
|
|
334
334
|
materialIcon
|
|
335
335
|
iconName="minus"
|
|
336
|
-
onPress={() =>
|
|
336
|
+
onPress={() => {
|
|
337
|
+
onPressZoomOut()
|
|
338
|
+
setAlertState({
|
|
339
|
+
open: true,
|
|
340
|
+
content: [t('THISISATEST', 'This is a test')]
|
|
341
|
+
})
|
|
342
|
+
}}
|
|
337
343
|
style={{
|
|
338
344
|
position: 'absolute',
|
|
339
345
|
bottom: 35,
|
|
@@ -341,7 +347,7 @@ const MapViewComponent = (props: MapViewParams) => {
|
|
|
341
347
|
}}
|
|
342
348
|
/>
|
|
343
349
|
</View>
|
|
344
|
-
) :
|
|
350
|
+
) : ''}
|
|
345
351
|
</View>
|
|
346
352
|
<View>
|
|
347
353
|
<Alert
|