ordering-ui-react-native 0.22.59 → 0.22.60

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.22.59",
3
+ "version": "0.22.60",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -8,7 +8,6 @@ import Alert from '../../../../../src/providers/AlertProvider'
8
8
  import { OIcon } from '../shared';
9
9
 
10
10
  export const GoogleMap = (props: GoogleMapsParams) => {
11
-
12
11
  const {
13
12
  location,
14
13
  handleChangeAddressMap,
@@ -23,7 +22,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
23
22
  businessZones,
24
23
  delta,
25
24
  autoCompleteAddress,
26
- setAutoCompleteAddress
25
+ setAutoCompleteAddress,
26
+ manualZoom
27
27
  } = props
28
28
 
29
29
  const [, t] = useLanguage()
@@ -217,11 +217,12 @@ export const GoogleMap = (props: GoogleMapsParams) => {
217
217
 
218
218
  useEffect(() => {
219
219
  const interval = setInterval(() => {
220
- if (mapRef.current && locations) {
220
+ if (mapRef.current && locations && !manualZoom) {
221
221
  fitAllMarkers()
222
222
  }
223
223
  }, 1000)
224
224
  if (locations) {
225
+ fitAllMarkers()
225
226
  SETMARKERS(locations)
226
227
  }
227
228
  return () => clearInterval(interval)
@@ -749,6 +749,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
749
749
  }
750
750
  locations={parsedLocations}
751
751
  readOnly
752
+ manualZoom
752
753
  />
753
754
  </Map>
754
755
  )}
@@ -639,6 +639,7 @@ export interface GoogleMapsParams {
639
639
  delta?: number
640
640
  setAutoCompleteAddress?: (val: boolean) => void,
641
641
  autoCompleteAddress?: boolean,
642
+ manualZoom?: boolean
642
643
  }
643
644
 
644
645
  export interface HelpParams {